azure_mgmt_synapse 0.17.1 → 0.17.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/2019-06-01-preview/generated/azure_mgmt_synapse.rb +124 -37
- data/lib/2019-06-01-preview/generated/azure_mgmt_synapse/integration_runtime_auth_keys_operations.rb +263 -0
- data/lib/2019-06-01-preview/generated/azure_mgmt_synapse/integration_runtime_connection_infos.rb +137 -0
- data/lib/2019-06-01-preview/generated/azure_mgmt_synapse/integration_runtime_credentials.rb +138 -0
- data/lib/2019-06-01-preview/generated/azure_mgmt_synapse/integration_runtime_monitoring_data_operations.rb +137 -0
- data/lib/2019-06-01-preview/generated/azure_mgmt_synapse/integration_runtime_node_ip_address_operations.rb +141 -0
- data/lib/2019-06-01-preview/generated/azure_mgmt_synapse/integration_runtime_nodes.rb +379 -0
- data/lib/2019-06-01-preview/generated/azure_mgmt_synapse/integration_runtime_object_metadata.rb +262 -0
- data/lib/2019-06-01-preview/generated/azure_mgmt_synapse/integration_runtime_status_operations.rb +137 -0
- data/lib/2019-06-01-preview/generated/azure_mgmt_synapse/integration_runtimes.rb +1053 -0
- data/lib/2019-06-01-preview/generated/azure_mgmt_synapse/ip_firewall_rules.rb +106 -0
- data/lib/2019-06-01-preview/generated/azure_mgmt_synapse/models/big_data_pool_resource_info.rb +0 -4
- data/lib/2019-06-01-preview/generated/azure_mgmt_synapse/models/cmdkey_setup.rb +86 -0
- data/lib/2019-06-01-preview/generated/azure_mgmt_synapse/models/component_setup.rb +75 -0
- data/lib/2019-06-01-preview/generated/azure_mgmt_synapse/models/custom_setup_base.rb +48 -0
- data/lib/2019-06-01-preview/generated/azure_mgmt_synapse/models/data_flow_compute_type.rb +17 -0
- data/lib/2019-06-01-preview/generated/azure_mgmt_synapse/models/entity_reference.rb +59 -0
- data/lib/2019-06-01-preview/generated/azure_mgmt_synapse/models/environment_variable_setup.rb +72 -0
- data/lib/2019-06-01-preview/generated/azure_mgmt_synapse/models/get_ssis_object_metadata_request.rb +46 -0
- data/lib/2019-06-01-preview/generated/azure_mgmt_synapse/models/integration_runtime.rb +78 -0
- data/lib/2019-06-01-preview/generated/azure_mgmt_synapse/models/integration_runtime_auth_key_name.rb +16 -0
- data/lib/2019-06-01-preview/generated/azure_mgmt_synapse/models/integration_runtime_auth_keys.rb +57 -0
- data/lib/2019-06-01-preview/generated/azure_mgmt_synapse/models/integration_runtime_auto_update.rb +16 -0
- data/lib/2019-06-01-preview/generated/azure_mgmt_synapse/models/integration_runtime_compute_properties.rb +135 -0
- data/lib/2019-06-01-preview/generated/azure_mgmt_synapse/models/integration_runtime_connection_info.rb +130 -0
- data/lib/2019-06-01-preview/generated/azure_mgmt_synapse/models/integration_runtime_custom_setup_script_properties.rb +61 -0
- data/lib/2019-06-01-preview/generated/azure_mgmt_synapse/models/integration_runtime_data_flow_properties.rb +94 -0
- data/lib/2019-06-01-preview/generated/azure_mgmt_synapse/models/integration_runtime_data_proxy_properties.rb +72 -0
- data/lib/2019-06-01-preview/generated/azure_mgmt_synapse/models/integration_runtime_edition.rb +16 -0
- data/lib/2019-06-01-preview/generated/azure_mgmt_synapse/models/integration_runtime_entity_reference_type.rb +16 -0
- data/lib/2019-06-01-preview/generated/azure_mgmt_synapse/models/integration_runtime_internal_channel_encryption_mode.rb +17 -0
- data/lib/2019-06-01-preview/generated/azure_mgmt_synapse/models/integration_runtime_license_type.rb +16 -0
- data/lib/2019-06-01-preview/generated/azure_mgmt_synapse/models/integration_runtime_list_response.rb +100 -0
- data/lib/2019-06-01-preview/generated/azure_mgmt_synapse/models/integration_runtime_monitoring_data.rb +67 -0
- data/lib/2019-06-01-preview/generated/azure_mgmt_synapse/models/integration_runtime_node_ip_address.rb +48 -0
- data/lib/2019-06-01-preview/generated/azure_mgmt_synapse/models/integration_runtime_node_monitoring_data.rb +154 -0
- data/lib/2019-06-01-preview/generated/azure_mgmt_synapse/models/integration_runtime_regenerate_key_parameters.rb +48 -0
- data/lib/2019-06-01-preview/generated/azure_mgmt_synapse/models/integration_runtime_resource.rb +85 -0
- data/lib/2019-06-01-preview/generated/azure_mgmt_synapse/models/integration_runtime_ssis_catalog_info.rb +107 -0
- data/lib/2019-06-01-preview/generated/azure_mgmt_synapse/models/integration_runtime_ssis_catalog_pricing_tier.rb +18 -0
- data/lib/2019-06-01-preview/generated/azure_mgmt_synapse/models/integration_runtime_ssis_properties.rb +141 -0
- data/lib/2019-06-01-preview/generated/azure_mgmt_synapse/models/integration_runtime_state.rb +24 -0
- data/lib/2019-06-01-preview/generated/azure_mgmt_synapse/models/integration_runtime_status.rb +94 -0
- data/lib/2019-06-01-preview/generated/azure_mgmt_synapse/models/integration_runtime_status_response.rb +61 -0
- data/lib/2019-06-01-preview/generated/azure_mgmt_synapse/models/integration_runtime_type.rb +16 -0
- data/lib/2019-06-01-preview/generated/azure_mgmt_synapse/models/integration_runtime_update_result.rb +17 -0
- data/lib/2019-06-01-preview/generated/azure_mgmt_synapse/models/integration_runtime_vnet_properties.rb +98 -0
- data/lib/2019-06-01-preview/generated/azure_mgmt_synapse/models/linked_integration_runtime.rb +98 -0
- data/lib/2019-06-01-preview/generated/azure_mgmt_synapse/models/linked_integration_runtime_key_authorization.rb +62 -0
- data/lib/2019-06-01-preview/generated/azure_mgmt_synapse/models/linked_integration_runtime_rbac_authorization.rb +64 -0
- data/lib/2019-06-01-preview/generated/azure_mgmt_synapse/models/linked_integration_runtime_type.rb +47 -0
- data/lib/2019-06-01-preview/generated/azure_mgmt_synapse/models/managed_integration_runtime.rb +115 -0
- data/lib/2019-06-01-preview/generated/azure_mgmt_synapse/models/managed_integration_runtime_error.rb +91 -0
- data/lib/2019-06-01-preview/generated/azure_mgmt_synapse/models/managed_integration_runtime_node.rb +82 -0
- data/lib/2019-06-01-preview/generated/azure_mgmt_synapse/models/managed_integration_runtime_node_status.rb +18 -0
- data/lib/2019-06-01-preview/generated/azure_mgmt_synapse/models/managed_integration_runtime_operation_result.rb +115 -0
- data/lib/2019-06-01-preview/generated/azure_mgmt_synapse/models/managed_integration_runtime_status.rb +154 -0
- data/lib/2019-06-01-preview/generated/azure_mgmt_synapse/models/private_endpoint.rb +47 -0
- data/lib/2019-06-01-preview/generated/azure_mgmt_synapse/models/private_endpoint_connection.rb +100 -0
- data/lib/2019-06-01-preview/generated/azure_mgmt_synapse/models/private_endpoint_connection_list.rb +100 -0
- data/lib/2019-06-01-preview/generated/azure_mgmt_synapse/models/private_link_hub.rb +99 -0
- data/lib/2019-06-01-preview/generated/azure_mgmt_synapse/models/private_link_hub_info_list_result.rb +98 -0
- data/lib/2019-06-01-preview/generated/azure_mgmt_synapse/models/private_link_hub_patch_info.rb +54 -0
- data/lib/2019-06-01-preview/generated/azure_mgmt_synapse/models/private_link_resource.rb +76 -0
- data/lib/2019-06-01-preview/generated/azure_mgmt_synapse/models/private_link_resource_list_result.rb +100 -0
- data/lib/2019-06-01-preview/generated/azure_mgmt_synapse/models/private_link_resource_properties.rb +89 -0
- data/lib/2019-06-01-preview/generated/azure_mgmt_synapse/models/private_link_service_connection_state.rb +71 -0
- data/lib/2019-06-01-preview/generated/azure_mgmt_synapse/models/secret_base.rb +46 -0
- data/lib/2019-06-01-preview/generated/azure_mgmt_synapse/models/secure_string.rb +62 -0
- data/lib/2019-06-01-preview/generated/azure_mgmt_synapse/models/self_hosted_integration_runtime.rb +87 -0
- data/lib/2019-06-01-preview/generated/azure_mgmt_synapse/models/self_hosted_integration_runtime_node.rb +273 -0
- data/lib/2019-06-01-preview/generated/azure_mgmt_synapse/models/self_hosted_integration_runtime_node_status.rb +21 -0
- data/lib/2019-06-01-preview/generated/azure_mgmt_synapse/models/self_hosted_integration_runtime_status.rb +322 -0
- data/lib/2019-06-01-preview/generated/azure_mgmt_synapse/models/ssis_environment.rb +105 -0
- data/lib/2019-06-01-preview/generated/azure_mgmt_synapse/models/ssis_environment_reference.rb +79 -0
- data/lib/2019-06-01-preview/generated/azure_mgmt_synapse/models/ssis_folder.rb +74 -0
- data/lib/2019-06-01-preview/generated/azure_mgmt_synapse/models/ssis_object_metadata.rb +82 -0
- data/lib/2019-06-01-preview/generated/azure_mgmt_synapse/models/ssis_object_metadata_list_response.rb +69 -0
- data/lib/2019-06-01-preview/generated/azure_mgmt_synapse/models/ssis_object_metadata_status_response.rb +79 -0
- data/lib/2019-06-01-preview/generated/azure_mgmt_synapse/models/ssis_object_metadata_type.rb +18 -0
- data/lib/2019-06-01-preview/generated/azure_mgmt_synapse/models/ssis_package.rb +127 -0
- data/lib/2019-06-01-preview/generated/azure_mgmt_synapse/models/ssis_parameter.rb +167 -0
- data/lib/2019-06-01-preview/generated/azure_mgmt_synapse/models/ssis_project.rb +137 -0
- data/lib/2019-06-01-preview/generated/azure_mgmt_synapse/models/ssis_variable.rb +112 -0
- data/lib/2019-06-01-preview/generated/azure_mgmt_synapse/models/sub_resource.rb +83 -0
- data/lib/2019-06-01-preview/generated/azure_mgmt_synapse/models/update_integration_runtime_node_request.rb +51 -0
- data/lib/2019-06-01-preview/generated/azure_mgmt_synapse/models/update_integration_runtime_request.rb +61 -0
- data/lib/2019-06-01-preview/generated/azure_mgmt_synapse/models/workspace.rb +34 -0
- data/lib/2019-06-01-preview/generated/azure_mgmt_synapse/private_endpoint_connections.rb +673 -0
- data/lib/2019-06-01-preview/generated/azure_mgmt_synapse/private_link_hubs.rb +878 -0
- data/lib/2019-06-01-preview/generated/azure_mgmt_synapse/private_link_resources.rb +369 -0
- data/lib/2019-06-01-preview/generated/azure_mgmt_synapse/sql_pools.rb +1 -1
- data/lib/2019-06-01-preview/generated/azure_mgmt_synapse/synapse_management_client.rb +55 -1
- data/lib/profiles/latest/modules/synapse_profile_module.rb +440 -116
- data/lib/version.rb +1 -1
- metadata +89 -2
data/lib/2019-06-01-preview/generated/azure_mgmt_synapse/integration_runtime_status_operations.rb
ADDED
@@ -0,0 +1,137 @@
|
|
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::Synapse::Mgmt::V2019_06_01_preview
|
7
|
+
#
|
8
|
+
# Azure Synapse Analytics Management Client
|
9
|
+
#
|
10
|
+
class IntegrationRuntimeStatusOperations
|
11
|
+
include MsRestAzure
|
12
|
+
|
13
|
+
#
|
14
|
+
# Creates and initializes a new instance of the IntegrationRuntimeStatusOperations class.
|
15
|
+
# @param client service class for accessing basic functionality.
|
16
|
+
#
|
17
|
+
def initialize(client)
|
18
|
+
@client = client
|
19
|
+
end
|
20
|
+
|
21
|
+
# @return [SynapseManagementClient] reference to the SynapseManagementClient
|
22
|
+
attr_reader :client
|
23
|
+
|
24
|
+
#
|
25
|
+
# Get integration runtime status
|
26
|
+
#
|
27
|
+
# Get the integration runtime status
|
28
|
+
#
|
29
|
+
# @param resource_group_name [String] The name of the resource group. The name
|
30
|
+
# is case insensitive.
|
31
|
+
# @param workspace_name [String] The name of the workspace
|
32
|
+
# @param integration_runtime_name [String] Integration runtime name
|
33
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
34
|
+
# will be added to the HTTP request.
|
35
|
+
#
|
36
|
+
# @return [IntegrationRuntimeStatusResponse] operation results.
|
37
|
+
#
|
38
|
+
def get(resource_group_name, workspace_name, integration_runtime_name, custom_headers:nil)
|
39
|
+
response = get_async(resource_group_name, workspace_name, integration_runtime_name, custom_headers:custom_headers).value!
|
40
|
+
response.body unless response.nil?
|
41
|
+
end
|
42
|
+
|
43
|
+
#
|
44
|
+
# Get integration runtime status
|
45
|
+
#
|
46
|
+
# Get the integration runtime status
|
47
|
+
#
|
48
|
+
# @param resource_group_name [String] The name of the resource group. The name
|
49
|
+
# is case insensitive.
|
50
|
+
# @param workspace_name [String] The name of the workspace
|
51
|
+
# @param integration_runtime_name [String] Integration runtime name
|
52
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
53
|
+
# will be added to the HTTP request.
|
54
|
+
#
|
55
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
56
|
+
#
|
57
|
+
def get_with_http_info(resource_group_name, workspace_name, integration_runtime_name, custom_headers:nil)
|
58
|
+
get_async(resource_group_name, workspace_name, integration_runtime_name, custom_headers:custom_headers).value!
|
59
|
+
end
|
60
|
+
|
61
|
+
#
|
62
|
+
# Get integration runtime status
|
63
|
+
#
|
64
|
+
# Get the integration runtime status
|
65
|
+
#
|
66
|
+
# @param resource_group_name [String] The name of the resource group. The name
|
67
|
+
# is case insensitive.
|
68
|
+
# @param workspace_name [String] The name of the workspace
|
69
|
+
# @param integration_runtime_name [String] Integration runtime name
|
70
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
71
|
+
# to the HTTP request.
|
72
|
+
#
|
73
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
74
|
+
#
|
75
|
+
def get_async(resource_group_name, workspace_name, integration_runtime_name, custom_headers:nil)
|
76
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
77
|
+
fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1
|
78
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
79
|
+
fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1
|
80
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
81
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
|
82
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
|
83
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
|
84
|
+
fail ArgumentError, 'workspace_name is nil' if workspace_name.nil?
|
85
|
+
fail ArgumentError, 'integration_runtime_name is nil' if integration_runtime_name.nil?
|
86
|
+
|
87
|
+
|
88
|
+
request_headers = {}
|
89
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
90
|
+
|
91
|
+
# Set Headers
|
92
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
93
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
94
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/integrationRuntimes/{integrationRuntimeName}/getStatus'
|
95
|
+
|
96
|
+
request_url = @base_url || @client.base_url
|
97
|
+
|
98
|
+
options = {
|
99
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
100
|
+
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'workspaceName' => workspace_name,'integrationRuntimeName' => integration_runtime_name},
|
101
|
+
query_params: {'api-version' => @client.api_version},
|
102
|
+
headers: request_headers.merge(custom_headers || {}),
|
103
|
+
base_url: request_url
|
104
|
+
}
|
105
|
+
promise = @client.make_request_async(:post, path_template, options)
|
106
|
+
|
107
|
+
promise = promise.then do |result|
|
108
|
+
http_response = result.response
|
109
|
+
status_code = http_response.status
|
110
|
+
response_content = http_response.body
|
111
|
+
unless status_code == 200
|
112
|
+
error_model = JSON.load(response_content)
|
113
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
114
|
+
end
|
115
|
+
|
116
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
117
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
118
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
119
|
+
# Deserialize Response
|
120
|
+
if status_code == 200
|
121
|
+
begin
|
122
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
123
|
+
result_mapper = Azure::Synapse::Mgmt::V2019_06_01_preview::Models::IntegrationRuntimeStatusResponse.mapper()
|
124
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
125
|
+
rescue Exception => e
|
126
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
127
|
+
end
|
128
|
+
end
|
129
|
+
|
130
|
+
result
|
131
|
+
end
|
132
|
+
|
133
|
+
promise.execute
|
134
|
+
end
|
135
|
+
|
136
|
+
end
|
137
|
+
end
|
@@ -0,0 +1,1053 @@
|
|
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::Synapse::Mgmt::V2019_06_01_preview
|
7
|
+
#
|
8
|
+
# Azure Synapse Analytics Management Client
|
9
|
+
#
|
10
|
+
class IntegrationRuntimes
|
11
|
+
include MsRestAzure
|
12
|
+
|
13
|
+
#
|
14
|
+
# Creates and initializes a new instance of the IntegrationRuntimes class.
|
15
|
+
# @param client service class for accessing basic functionality.
|
16
|
+
#
|
17
|
+
def initialize(client)
|
18
|
+
@client = client
|
19
|
+
end
|
20
|
+
|
21
|
+
# @return [SynapseManagementClient] reference to the SynapseManagementClient
|
22
|
+
attr_reader :client
|
23
|
+
|
24
|
+
#
|
25
|
+
# Update integration runtime
|
26
|
+
#
|
27
|
+
# Update an integration runtime
|
28
|
+
#
|
29
|
+
# @param resource_group_name [String] The name of the resource group. The name
|
30
|
+
# is case insensitive.
|
31
|
+
# @param workspace_name [String] The name of the workspace
|
32
|
+
# @param integration_runtime_name [String] Integration runtime name
|
33
|
+
# @param update_integration_runtime_request [UpdateIntegrationRuntimeRequest]
|
34
|
+
# The parameters for updating an integration runtime.
|
35
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
36
|
+
# will be added to the HTTP request.
|
37
|
+
#
|
38
|
+
# @return [IntegrationRuntimeResource] operation results.
|
39
|
+
#
|
40
|
+
def update(resource_group_name, workspace_name, integration_runtime_name, update_integration_runtime_request, custom_headers:nil)
|
41
|
+
response = update_async(resource_group_name, workspace_name, integration_runtime_name, update_integration_runtime_request, custom_headers:custom_headers).value!
|
42
|
+
response.body unless response.nil?
|
43
|
+
end
|
44
|
+
|
45
|
+
#
|
46
|
+
# Update integration runtime
|
47
|
+
#
|
48
|
+
# Update an integration runtime
|
49
|
+
#
|
50
|
+
# @param resource_group_name [String] The name of the resource group. The name
|
51
|
+
# is case insensitive.
|
52
|
+
# @param workspace_name [String] The name of the workspace
|
53
|
+
# @param integration_runtime_name [String] Integration runtime name
|
54
|
+
# @param update_integration_runtime_request [UpdateIntegrationRuntimeRequest]
|
55
|
+
# The parameters for updating an integration runtime.
|
56
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
57
|
+
# will be added to the HTTP request.
|
58
|
+
#
|
59
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
60
|
+
#
|
61
|
+
def update_with_http_info(resource_group_name, workspace_name, integration_runtime_name, update_integration_runtime_request, custom_headers:nil)
|
62
|
+
update_async(resource_group_name, workspace_name, integration_runtime_name, update_integration_runtime_request, custom_headers:custom_headers).value!
|
63
|
+
end
|
64
|
+
|
65
|
+
#
|
66
|
+
# Update integration runtime
|
67
|
+
#
|
68
|
+
# Update an integration runtime
|
69
|
+
#
|
70
|
+
# @param resource_group_name [String] The name of the resource group. The name
|
71
|
+
# is case insensitive.
|
72
|
+
# @param workspace_name [String] The name of the workspace
|
73
|
+
# @param integration_runtime_name [String] Integration runtime name
|
74
|
+
# @param update_integration_runtime_request [UpdateIntegrationRuntimeRequest]
|
75
|
+
# The parameters for updating an integration runtime.
|
76
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
77
|
+
# to the HTTP request.
|
78
|
+
#
|
79
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
80
|
+
#
|
81
|
+
def update_async(resource_group_name, workspace_name, integration_runtime_name, update_integration_runtime_request, custom_headers:nil)
|
82
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
83
|
+
fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1
|
84
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
85
|
+
fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1
|
86
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
87
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
|
88
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
|
89
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
|
90
|
+
fail ArgumentError, 'workspace_name is nil' if workspace_name.nil?
|
91
|
+
fail ArgumentError, 'integration_runtime_name is nil' if integration_runtime_name.nil?
|
92
|
+
fail ArgumentError, 'update_integration_runtime_request is nil' if update_integration_runtime_request.nil?
|
93
|
+
|
94
|
+
|
95
|
+
request_headers = {}
|
96
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
97
|
+
|
98
|
+
# Set Headers
|
99
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
100
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
101
|
+
|
102
|
+
# Serialize Request
|
103
|
+
request_mapper = Azure::Synapse::Mgmt::V2019_06_01_preview::Models::UpdateIntegrationRuntimeRequest.mapper()
|
104
|
+
request_content = @client.serialize(request_mapper, update_integration_runtime_request)
|
105
|
+
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
106
|
+
|
107
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/integrationRuntimes/{integrationRuntimeName}'
|
108
|
+
|
109
|
+
request_url = @base_url || @client.base_url
|
110
|
+
|
111
|
+
options = {
|
112
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
113
|
+
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'workspaceName' => workspace_name,'integrationRuntimeName' => integration_runtime_name},
|
114
|
+
query_params: {'api-version' => @client.api_version},
|
115
|
+
body: request_content,
|
116
|
+
headers: request_headers.merge(custom_headers || {}),
|
117
|
+
base_url: request_url
|
118
|
+
}
|
119
|
+
promise = @client.make_request_async(:patch, path_template, options)
|
120
|
+
|
121
|
+
promise = promise.then do |result|
|
122
|
+
http_response = result.response
|
123
|
+
status_code = http_response.status
|
124
|
+
response_content = http_response.body
|
125
|
+
unless status_code == 200
|
126
|
+
error_model = JSON.load(response_content)
|
127
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
128
|
+
end
|
129
|
+
|
130
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
131
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
132
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
133
|
+
# Deserialize Response
|
134
|
+
if status_code == 200
|
135
|
+
begin
|
136
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
137
|
+
result_mapper = Azure::Synapse::Mgmt::V2019_06_01_preview::Models::IntegrationRuntimeResource.mapper()
|
138
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
139
|
+
rescue Exception => e
|
140
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
141
|
+
end
|
142
|
+
end
|
143
|
+
|
144
|
+
result
|
145
|
+
end
|
146
|
+
|
147
|
+
promise.execute
|
148
|
+
end
|
149
|
+
|
150
|
+
#
|
151
|
+
# Get integration runtime
|
152
|
+
#
|
153
|
+
# Get an integration runtime
|
154
|
+
#
|
155
|
+
# @param resource_group_name [String] The name of the resource group. The name
|
156
|
+
# is case insensitive.
|
157
|
+
# @param workspace_name [String] The name of the workspace
|
158
|
+
# @param integration_runtime_name [String] Integration runtime name
|
159
|
+
# @param if_none_match [String] ETag of the integration runtime entity. Should
|
160
|
+
# only be specified for get. If the ETag matches the existing entity tag, or if
|
161
|
+
# * was provided, then no content will be returned.
|
162
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
163
|
+
# will be added to the HTTP request.
|
164
|
+
#
|
165
|
+
# @return [IntegrationRuntimeResource] operation results.
|
166
|
+
#
|
167
|
+
def get(resource_group_name, workspace_name, integration_runtime_name, if_none_match:nil, custom_headers:nil)
|
168
|
+
response = get_async(resource_group_name, workspace_name, integration_runtime_name, if_none_match:if_none_match, custom_headers:custom_headers).value!
|
169
|
+
response.body unless response.nil?
|
170
|
+
end
|
171
|
+
|
172
|
+
#
|
173
|
+
# Get integration runtime
|
174
|
+
#
|
175
|
+
# Get an integration runtime
|
176
|
+
#
|
177
|
+
# @param resource_group_name [String] The name of the resource group. The name
|
178
|
+
# is case insensitive.
|
179
|
+
# @param workspace_name [String] The name of the workspace
|
180
|
+
# @param integration_runtime_name [String] Integration runtime name
|
181
|
+
# @param if_none_match [String] ETag of the integration runtime entity. Should
|
182
|
+
# only be specified for get. If the ETag matches the existing entity tag, or if
|
183
|
+
# * was provided, then no content will be returned.
|
184
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
185
|
+
# will be added to the HTTP request.
|
186
|
+
#
|
187
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
188
|
+
#
|
189
|
+
def get_with_http_info(resource_group_name, workspace_name, integration_runtime_name, if_none_match:nil, custom_headers:nil)
|
190
|
+
get_async(resource_group_name, workspace_name, integration_runtime_name, if_none_match:if_none_match, custom_headers:custom_headers).value!
|
191
|
+
end
|
192
|
+
|
193
|
+
#
|
194
|
+
# Get integration runtime
|
195
|
+
#
|
196
|
+
# Get an integration runtime
|
197
|
+
#
|
198
|
+
# @param resource_group_name [String] The name of the resource group. The name
|
199
|
+
# is case insensitive.
|
200
|
+
# @param workspace_name [String] The name of the workspace
|
201
|
+
# @param integration_runtime_name [String] Integration runtime name
|
202
|
+
# @param if_none_match [String] ETag of the integration runtime entity. Should
|
203
|
+
# only be specified for get. If the ETag matches the existing entity tag, or if
|
204
|
+
# * was provided, then no content will be returned.
|
205
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
206
|
+
# to the HTTP request.
|
207
|
+
#
|
208
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
209
|
+
#
|
210
|
+
def get_async(resource_group_name, workspace_name, integration_runtime_name, if_none_match:nil, custom_headers:nil)
|
211
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
212
|
+
fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1
|
213
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
214
|
+
fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1
|
215
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
216
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
|
217
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
|
218
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
|
219
|
+
fail ArgumentError, 'workspace_name is nil' if workspace_name.nil?
|
220
|
+
fail ArgumentError, 'integration_runtime_name is nil' if integration_runtime_name.nil?
|
221
|
+
|
222
|
+
|
223
|
+
request_headers = {}
|
224
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
225
|
+
|
226
|
+
# Set Headers
|
227
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
228
|
+
request_headers['If-None-Match'] = if_none_match unless if_none_match.nil?
|
229
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
230
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/integrationRuntimes/{integrationRuntimeName}'
|
231
|
+
|
232
|
+
request_url = @base_url || @client.base_url
|
233
|
+
|
234
|
+
options = {
|
235
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
236
|
+
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'workspaceName' => workspace_name,'integrationRuntimeName' => integration_runtime_name},
|
237
|
+
query_params: {'api-version' => @client.api_version},
|
238
|
+
headers: request_headers.merge(custom_headers || {}),
|
239
|
+
base_url: request_url
|
240
|
+
}
|
241
|
+
promise = @client.make_request_async(:get, path_template, options)
|
242
|
+
|
243
|
+
promise = promise.then do |result|
|
244
|
+
http_response = result.response
|
245
|
+
status_code = http_response.status
|
246
|
+
response_content = http_response.body
|
247
|
+
unless status_code == 200 || status_code == 304
|
248
|
+
error_model = JSON.load(response_content)
|
249
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
250
|
+
end
|
251
|
+
|
252
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
253
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
254
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
255
|
+
# Deserialize Response
|
256
|
+
if status_code == 200
|
257
|
+
begin
|
258
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
259
|
+
result_mapper = Azure::Synapse::Mgmt::V2019_06_01_preview::Models::IntegrationRuntimeResource.mapper()
|
260
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
261
|
+
rescue Exception => e
|
262
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
263
|
+
end
|
264
|
+
end
|
265
|
+
|
266
|
+
result
|
267
|
+
end
|
268
|
+
|
269
|
+
promise.execute
|
270
|
+
end
|
271
|
+
|
272
|
+
#
|
273
|
+
# Create integration runtime
|
274
|
+
#
|
275
|
+
# Create an integration runtime
|
276
|
+
#
|
277
|
+
# @param resource_group_name [String] The name of the resource group. The name
|
278
|
+
# is case insensitive.
|
279
|
+
# @param workspace_name [String] The name of the workspace
|
280
|
+
# @param integration_runtime_name [String] Integration runtime name
|
281
|
+
# @param integration_runtime [IntegrationRuntimeResource] Integration runtime
|
282
|
+
# resource definition.
|
283
|
+
# @param if_match [String] ETag of the integration runtime entity. Should only
|
284
|
+
# be specified for update, for which it should match existing entity or can be
|
285
|
+
# * for unconditional update.
|
286
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
287
|
+
# will be added to the HTTP request.
|
288
|
+
#
|
289
|
+
# @return [IntegrationRuntimeResource] operation results.
|
290
|
+
#
|
291
|
+
def create(resource_group_name, workspace_name, integration_runtime_name, integration_runtime, if_match:nil, custom_headers:nil)
|
292
|
+
response = create_async(resource_group_name, workspace_name, integration_runtime_name, integration_runtime, if_match:if_match, custom_headers:custom_headers).value!
|
293
|
+
response.body unless response.nil?
|
294
|
+
end
|
295
|
+
|
296
|
+
#
|
297
|
+
# Create integration runtime
|
298
|
+
#
|
299
|
+
# Create an integration runtime
|
300
|
+
#
|
301
|
+
# @param resource_group_name [String] The name of the resource group. The name
|
302
|
+
# is case insensitive.
|
303
|
+
# @param workspace_name [String] The name of the workspace
|
304
|
+
# @param integration_runtime_name [String] Integration runtime name
|
305
|
+
# @param integration_runtime [IntegrationRuntimeResource] Integration runtime
|
306
|
+
# resource definition.
|
307
|
+
# @param if_match [String] ETag of the integration runtime entity. Should only
|
308
|
+
# be specified for update, for which it should match existing entity or can be
|
309
|
+
# * for unconditional update.
|
310
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
311
|
+
# will be added to the HTTP request.
|
312
|
+
#
|
313
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
314
|
+
#
|
315
|
+
def create_with_http_info(resource_group_name, workspace_name, integration_runtime_name, integration_runtime, if_match:nil, custom_headers:nil)
|
316
|
+
create_async(resource_group_name, workspace_name, integration_runtime_name, integration_runtime, if_match:if_match, custom_headers:custom_headers).value!
|
317
|
+
end
|
318
|
+
|
319
|
+
#
|
320
|
+
# Create integration runtime
|
321
|
+
#
|
322
|
+
# Create an integration runtime
|
323
|
+
#
|
324
|
+
# @param resource_group_name [String] The name of the resource group. The name
|
325
|
+
# is case insensitive.
|
326
|
+
# @param workspace_name [String] The name of the workspace
|
327
|
+
# @param integration_runtime_name [String] Integration runtime name
|
328
|
+
# @param integration_runtime [IntegrationRuntimeResource] Integration runtime
|
329
|
+
# resource definition.
|
330
|
+
# @param if_match [String] ETag of the integration runtime entity. Should only
|
331
|
+
# be specified for update, for which it should match existing entity or can be
|
332
|
+
# * for unconditional update.
|
333
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
334
|
+
# to the HTTP request.
|
335
|
+
#
|
336
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
337
|
+
#
|
338
|
+
def create_async(resource_group_name, workspace_name, integration_runtime_name, integration_runtime, if_match:nil, custom_headers:nil)
|
339
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
340
|
+
fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1
|
341
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
342
|
+
fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1
|
343
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
344
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
|
345
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
|
346
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
|
347
|
+
fail ArgumentError, 'workspace_name is nil' if workspace_name.nil?
|
348
|
+
fail ArgumentError, 'integration_runtime_name is nil' if integration_runtime_name.nil?
|
349
|
+
fail ArgumentError, 'integration_runtime is nil' if integration_runtime.nil?
|
350
|
+
|
351
|
+
|
352
|
+
request_headers = {}
|
353
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
354
|
+
|
355
|
+
# Set Headers
|
356
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
357
|
+
request_headers['If-Match'] = if_match unless if_match.nil?
|
358
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
359
|
+
|
360
|
+
# Serialize Request
|
361
|
+
request_mapper = Azure::Synapse::Mgmt::V2019_06_01_preview::Models::IntegrationRuntimeResource.mapper()
|
362
|
+
request_content = @client.serialize(request_mapper, integration_runtime)
|
363
|
+
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
364
|
+
|
365
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/integrationRuntimes/{integrationRuntimeName}'
|
366
|
+
|
367
|
+
request_url = @base_url || @client.base_url
|
368
|
+
|
369
|
+
options = {
|
370
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
371
|
+
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'workspaceName' => workspace_name,'integrationRuntimeName' => integration_runtime_name},
|
372
|
+
query_params: {'api-version' => @client.api_version},
|
373
|
+
body: request_content,
|
374
|
+
headers: request_headers.merge(custom_headers || {}),
|
375
|
+
base_url: request_url
|
376
|
+
}
|
377
|
+
promise = @client.make_request_async(:put, path_template, options)
|
378
|
+
|
379
|
+
promise = promise.then do |result|
|
380
|
+
http_response = result.response
|
381
|
+
status_code = http_response.status
|
382
|
+
response_content = http_response.body
|
383
|
+
unless status_code == 200
|
384
|
+
error_model = JSON.load(response_content)
|
385
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
386
|
+
end
|
387
|
+
|
388
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
389
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
390
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
391
|
+
# Deserialize Response
|
392
|
+
if status_code == 200
|
393
|
+
begin
|
394
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
395
|
+
result_mapper = Azure::Synapse::Mgmt::V2019_06_01_preview::Models::IntegrationRuntimeResource.mapper()
|
396
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
397
|
+
rescue Exception => e
|
398
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
399
|
+
end
|
400
|
+
end
|
401
|
+
|
402
|
+
result
|
403
|
+
end
|
404
|
+
|
405
|
+
promise.execute
|
406
|
+
end
|
407
|
+
|
408
|
+
#
|
409
|
+
# Delete integration runtime
|
410
|
+
#
|
411
|
+
# Delete an integration runtime
|
412
|
+
#
|
413
|
+
# @param resource_group_name [String] The name of the resource group. The name
|
414
|
+
# is case insensitive.
|
415
|
+
# @param workspace_name [String] The name of the workspace
|
416
|
+
# @param integration_runtime_name [String] Integration runtime name
|
417
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
418
|
+
# will be added to the HTTP request.
|
419
|
+
#
|
420
|
+
#
|
421
|
+
def delete(resource_group_name, workspace_name, integration_runtime_name, custom_headers:nil)
|
422
|
+
response = delete_async(resource_group_name, workspace_name, integration_runtime_name, custom_headers:custom_headers).value!
|
423
|
+
nil
|
424
|
+
end
|
425
|
+
|
426
|
+
#
|
427
|
+
# Delete integration runtime
|
428
|
+
#
|
429
|
+
# Delete an integration runtime
|
430
|
+
#
|
431
|
+
# @param resource_group_name [String] The name of the resource group. The name
|
432
|
+
# is case insensitive.
|
433
|
+
# @param workspace_name [String] The name of the workspace
|
434
|
+
# @param integration_runtime_name [String] Integration runtime name
|
435
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
436
|
+
# will be added to the HTTP request.
|
437
|
+
#
|
438
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
439
|
+
#
|
440
|
+
def delete_with_http_info(resource_group_name, workspace_name, integration_runtime_name, custom_headers:nil)
|
441
|
+
delete_async(resource_group_name, workspace_name, integration_runtime_name, custom_headers:custom_headers).value!
|
442
|
+
end
|
443
|
+
|
444
|
+
#
|
445
|
+
# Delete integration runtime
|
446
|
+
#
|
447
|
+
# Delete an integration runtime
|
448
|
+
#
|
449
|
+
# @param resource_group_name [String] The name of the resource group. The name
|
450
|
+
# is case insensitive.
|
451
|
+
# @param workspace_name [String] The name of the workspace
|
452
|
+
# @param integration_runtime_name [String] Integration runtime name
|
453
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
454
|
+
# to the HTTP request.
|
455
|
+
#
|
456
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
457
|
+
#
|
458
|
+
def delete_async(resource_group_name, workspace_name, integration_runtime_name, custom_headers:nil)
|
459
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
460
|
+
fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1
|
461
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
462
|
+
fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1
|
463
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
464
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
|
465
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
|
466
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
|
467
|
+
fail ArgumentError, 'workspace_name is nil' if workspace_name.nil?
|
468
|
+
fail ArgumentError, 'integration_runtime_name is nil' if integration_runtime_name.nil?
|
469
|
+
|
470
|
+
|
471
|
+
request_headers = {}
|
472
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
473
|
+
|
474
|
+
# Set Headers
|
475
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
476
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
477
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/integrationRuntimes/{integrationRuntimeName}'
|
478
|
+
|
479
|
+
request_url = @base_url || @client.base_url
|
480
|
+
|
481
|
+
options = {
|
482
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
483
|
+
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'workspaceName' => workspace_name,'integrationRuntimeName' => integration_runtime_name},
|
484
|
+
query_params: {'api-version' => @client.api_version},
|
485
|
+
headers: request_headers.merge(custom_headers || {}),
|
486
|
+
base_url: request_url
|
487
|
+
}
|
488
|
+
promise = @client.make_request_async(:delete, path_template, options)
|
489
|
+
|
490
|
+
promise = promise.then do |result|
|
491
|
+
http_response = result.response
|
492
|
+
status_code = http_response.status
|
493
|
+
response_content = http_response.body
|
494
|
+
unless status_code == 200 || status_code == 204
|
495
|
+
error_model = JSON.load(response_content)
|
496
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
497
|
+
end
|
498
|
+
|
499
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
500
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
501
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
502
|
+
|
503
|
+
result
|
504
|
+
end
|
505
|
+
|
506
|
+
promise.execute
|
507
|
+
end
|
508
|
+
|
509
|
+
#
|
510
|
+
# Upgrade integration runtime
|
511
|
+
#
|
512
|
+
# Upgrade an integration runtime
|
513
|
+
#
|
514
|
+
# @param resource_group_name [String] The name of the resource group. The name
|
515
|
+
# is case insensitive.
|
516
|
+
# @param workspace_name [String] The name of the workspace
|
517
|
+
# @param integration_runtime_name [String] Integration runtime name
|
518
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
519
|
+
# will be added to the HTTP request.
|
520
|
+
#
|
521
|
+
#
|
522
|
+
def upgrade(resource_group_name, workspace_name, integration_runtime_name, custom_headers:nil)
|
523
|
+
response = upgrade_async(resource_group_name, workspace_name, integration_runtime_name, custom_headers:custom_headers).value!
|
524
|
+
nil
|
525
|
+
end
|
526
|
+
|
527
|
+
#
|
528
|
+
# Upgrade integration runtime
|
529
|
+
#
|
530
|
+
# Upgrade an integration runtime
|
531
|
+
#
|
532
|
+
# @param resource_group_name [String] The name of the resource group. The name
|
533
|
+
# is case insensitive.
|
534
|
+
# @param workspace_name [String] The name of the workspace
|
535
|
+
# @param integration_runtime_name [String] Integration runtime name
|
536
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
537
|
+
# will be added to the HTTP request.
|
538
|
+
#
|
539
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
540
|
+
#
|
541
|
+
def upgrade_with_http_info(resource_group_name, workspace_name, integration_runtime_name, custom_headers:nil)
|
542
|
+
upgrade_async(resource_group_name, workspace_name, integration_runtime_name, custom_headers:custom_headers).value!
|
543
|
+
end
|
544
|
+
|
545
|
+
#
|
546
|
+
# Upgrade integration runtime
|
547
|
+
#
|
548
|
+
# Upgrade an integration runtime
|
549
|
+
#
|
550
|
+
# @param resource_group_name [String] The name of the resource group. The name
|
551
|
+
# is case insensitive.
|
552
|
+
# @param workspace_name [String] The name of the workspace
|
553
|
+
# @param integration_runtime_name [String] Integration runtime name
|
554
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
555
|
+
# to the HTTP request.
|
556
|
+
#
|
557
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
558
|
+
#
|
559
|
+
def upgrade_async(resource_group_name, workspace_name, integration_runtime_name, custom_headers:nil)
|
560
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
561
|
+
fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1
|
562
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
563
|
+
fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1
|
564
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
565
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
|
566
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
|
567
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
|
568
|
+
fail ArgumentError, 'workspace_name is nil' if workspace_name.nil?
|
569
|
+
fail ArgumentError, 'integration_runtime_name is nil' if integration_runtime_name.nil?
|
570
|
+
|
571
|
+
|
572
|
+
request_headers = {}
|
573
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
574
|
+
|
575
|
+
# Set Headers
|
576
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
577
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
578
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/integrationRuntimes/{integrationRuntimeName}/upgrade'
|
579
|
+
|
580
|
+
request_url = @base_url || @client.base_url
|
581
|
+
|
582
|
+
options = {
|
583
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
584
|
+
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'workspaceName' => workspace_name,'integrationRuntimeName' => integration_runtime_name},
|
585
|
+
query_params: {'api-version' => @client.api_version},
|
586
|
+
headers: request_headers.merge(custom_headers || {}),
|
587
|
+
base_url: request_url
|
588
|
+
}
|
589
|
+
promise = @client.make_request_async(:post, path_template, options)
|
590
|
+
|
591
|
+
promise = promise.then do |result|
|
592
|
+
http_response = result.response
|
593
|
+
status_code = http_response.status
|
594
|
+
response_content = http_response.body
|
595
|
+
unless status_code == 200
|
596
|
+
error_model = JSON.load(response_content)
|
597
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
598
|
+
end
|
599
|
+
|
600
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
601
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
602
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
603
|
+
|
604
|
+
result
|
605
|
+
end
|
606
|
+
|
607
|
+
promise.execute
|
608
|
+
end
|
609
|
+
|
610
|
+
#
|
611
|
+
# List integration runtimes
|
612
|
+
#
|
613
|
+
# List all integration runtimes
|
614
|
+
#
|
615
|
+
# @param resource_group_name [String] The name of the resource group. The name
|
616
|
+
# is case insensitive.
|
617
|
+
# @param workspace_name [String] The name of the workspace
|
618
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
619
|
+
# will be added to the HTTP request.
|
620
|
+
#
|
621
|
+
# @return [Array<IntegrationRuntimeResource>] operation results.
|
622
|
+
#
|
623
|
+
def list_by_workspace(resource_group_name, workspace_name, custom_headers:nil)
|
624
|
+
first_page = list_by_workspace_as_lazy(resource_group_name, workspace_name, custom_headers:custom_headers)
|
625
|
+
first_page.get_all_items
|
626
|
+
end
|
627
|
+
|
628
|
+
#
|
629
|
+
# List integration runtimes
|
630
|
+
#
|
631
|
+
# List all integration runtimes
|
632
|
+
#
|
633
|
+
# @param resource_group_name [String] The name of the resource group. The name
|
634
|
+
# is case insensitive.
|
635
|
+
# @param workspace_name [String] The name of the workspace
|
636
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
637
|
+
# will be added to the HTTP request.
|
638
|
+
#
|
639
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
640
|
+
#
|
641
|
+
def list_by_workspace_with_http_info(resource_group_name, workspace_name, custom_headers:nil)
|
642
|
+
list_by_workspace_async(resource_group_name, workspace_name, custom_headers:custom_headers).value!
|
643
|
+
end
|
644
|
+
|
645
|
+
#
|
646
|
+
# List integration runtimes
|
647
|
+
#
|
648
|
+
# List all integration runtimes
|
649
|
+
#
|
650
|
+
# @param resource_group_name [String] The name of the resource group. The name
|
651
|
+
# is case insensitive.
|
652
|
+
# @param workspace_name [String] The name of the workspace
|
653
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
654
|
+
# to the HTTP request.
|
655
|
+
#
|
656
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
657
|
+
#
|
658
|
+
def list_by_workspace_async(resource_group_name, workspace_name, custom_headers:nil)
|
659
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
660
|
+
fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1
|
661
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
662
|
+
fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1
|
663
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
664
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
|
665
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
|
666
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
|
667
|
+
fail ArgumentError, 'workspace_name is nil' if workspace_name.nil?
|
668
|
+
|
669
|
+
|
670
|
+
request_headers = {}
|
671
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
672
|
+
|
673
|
+
# Set Headers
|
674
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
675
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
676
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/integrationRuntimes'
|
677
|
+
|
678
|
+
request_url = @base_url || @client.base_url
|
679
|
+
|
680
|
+
options = {
|
681
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
682
|
+
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'workspaceName' => workspace_name},
|
683
|
+
query_params: {'api-version' => @client.api_version},
|
684
|
+
headers: request_headers.merge(custom_headers || {}),
|
685
|
+
base_url: request_url
|
686
|
+
}
|
687
|
+
promise = @client.make_request_async(:get, path_template, options)
|
688
|
+
|
689
|
+
promise = promise.then do |result|
|
690
|
+
http_response = result.response
|
691
|
+
status_code = http_response.status
|
692
|
+
response_content = http_response.body
|
693
|
+
unless status_code == 200
|
694
|
+
error_model = JSON.load(response_content)
|
695
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
696
|
+
end
|
697
|
+
|
698
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
699
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
700
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
701
|
+
# Deserialize Response
|
702
|
+
if status_code == 200
|
703
|
+
begin
|
704
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
705
|
+
result_mapper = Azure::Synapse::Mgmt::V2019_06_01_preview::Models::IntegrationRuntimeListResponse.mapper()
|
706
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
707
|
+
rescue Exception => e
|
708
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
709
|
+
end
|
710
|
+
end
|
711
|
+
|
712
|
+
result
|
713
|
+
end
|
714
|
+
|
715
|
+
promise.execute
|
716
|
+
end
|
717
|
+
|
718
|
+
#
|
719
|
+
# Start integration runtime
|
720
|
+
#
|
721
|
+
# Start an integration runtime
|
722
|
+
#
|
723
|
+
# @param resource_group_name [String] The name of the resource group. The name
|
724
|
+
# is case insensitive.
|
725
|
+
# @param workspace_name [String] The name of the workspace
|
726
|
+
# @param integration_runtime_name [String] Integration runtime name
|
727
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
728
|
+
# will be added to the HTTP request.
|
729
|
+
#
|
730
|
+
# @return [IntegrationRuntimeStatusResponse] operation results.
|
731
|
+
#
|
732
|
+
def start(resource_group_name, workspace_name, integration_runtime_name, custom_headers:nil)
|
733
|
+
response = start_async(resource_group_name, workspace_name, integration_runtime_name, custom_headers:custom_headers).value!
|
734
|
+
response.body unless response.nil?
|
735
|
+
end
|
736
|
+
|
737
|
+
#
|
738
|
+
# Start integration runtime
|
739
|
+
#
|
740
|
+
# Start an integration runtime
|
741
|
+
#
|
742
|
+
# @param resource_group_name [String] The name of the resource group. The name
|
743
|
+
# is case insensitive.
|
744
|
+
# @param workspace_name [String] The name of the workspace
|
745
|
+
# @param integration_runtime_name [String] Integration runtime name
|
746
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
747
|
+
# will be added to the HTTP request.
|
748
|
+
#
|
749
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
750
|
+
#
|
751
|
+
def start_with_http_info(resource_group_name, workspace_name, integration_runtime_name, custom_headers:nil)
|
752
|
+
start_async(resource_group_name, workspace_name, integration_runtime_name, custom_headers:custom_headers).value!
|
753
|
+
end
|
754
|
+
|
755
|
+
#
|
756
|
+
# Start integration runtime
|
757
|
+
#
|
758
|
+
# Start an integration runtime
|
759
|
+
#
|
760
|
+
# @param resource_group_name [String] The name of the resource group. The name
|
761
|
+
# is case insensitive.
|
762
|
+
# @param workspace_name [String] The name of the workspace
|
763
|
+
# @param integration_runtime_name [String] Integration runtime name
|
764
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
765
|
+
# to the HTTP request.
|
766
|
+
#
|
767
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
768
|
+
#
|
769
|
+
def start_async(resource_group_name, workspace_name, integration_runtime_name, custom_headers:nil)
|
770
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
771
|
+
fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1
|
772
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
773
|
+
fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1
|
774
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
775
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
|
776
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
|
777
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
|
778
|
+
fail ArgumentError, 'workspace_name is nil' if workspace_name.nil?
|
779
|
+
fail ArgumentError, 'integration_runtime_name is nil' if integration_runtime_name.nil?
|
780
|
+
|
781
|
+
|
782
|
+
request_headers = {}
|
783
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
784
|
+
|
785
|
+
# Set Headers
|
786
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
787
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
788
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/integrationRuntimes/{integrationRuntimeName}/start'
|
789
|
+
|
790
|
+
request_url = @base_url || @client.base_url
|
791
|
+
|
792
|
+
options = {
|
793
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
794
|
+
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'workspaceName' => workspace_name,'integrationRuntimeName' => integration_runtime_name},
|
795
|
+
query_params: {'api-version' => @client.api_version},
|
796
|
+
headers: request_headers.merge(custom_headers || {}),
|
797
|
+
base_url: request_url
|
798
|
+
}
|
799
|
+
promise = @client.make_request_async(:post, path_template, options)
|
800
|
+
|
801
|
+
promise = promise.then do |result|
|
802
|
+
http_response = result.response
|
803
|
+
status_code = http_response.status
|
804
|
+
response_content = http_response.body
|
805
|
+
unless status_code == 200 || status_code == 202
|
806
|
+
error_model = JSON.load(response_content)
|
807
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
808
|
+
end
|
809
|
+
|
810
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
811
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
812
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
813
|
+
# Deserialize Response
|
814
|
+
if status_code == 200
|
815
|
+
begin
|
816
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
817
|
+
result_mapper = Azure::Synapse::Mgmt::V2019_06_01_preview::Models::IntegrationRuntimeStatusResponse.mapper()
|
818
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
819
|
+
rescue Exception => e
|
820
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
821
|
+
end
|
822
|
+
end
|
823
|
+
|
824
|
+
result
|
825
|
+
end
|
826
|
+
|
827
|
+
promise.execute
|
828
|
+
end
|
829
|
+
|
830
|
+
#
|
831
|
+
# Stop integration runtime
|
832
|
+
#
|
833
|
+
# Stop an integration runtime
|
834
|
+
#
|
835
|
+
# @param resource_group_name [String] The name of the resource group. The name
|
836
|
+
# is case insensitive.
|
837
|
+
# @param workspace_name [String] The name of the workspace
|
838
|
+
# @param integration_runtime_name [String] Integration runtime name
|
839
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
840
|
+
# will be added to the HTTP request.
|
841
|
+
#
|
842
|
+
#
|
843
|
+
def stop(resource_group_name, workspace_name, integration_runtime_name, custom_headers:nil)
|
844
|
+
response = stop_async(resource_group_name, workspace_name, integration_runtime_name, custom_headers:custom_headers).value!
|
845
|
+
nil
|
846
|
+
end
|
847
|
+
|
848
|
+
#
|
849
|
+
# Stop integration runtime
|
850
|
+
#
|
851
|
+
# Stop an integration runtime
|
852
|
+
#
|
853
|
+
# @param resource_group_name [String] The name of the resource group. The name
|
854
|
+
# is case insensitive.
|
855
|
+
# @param workspace_name [String] The name of the workspace
|
856
|
+
# @param integration_runtime_name [String] Integration runtime name
|
857
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
858
|
+
# will be added to the HTTP request.
|
859
|
+
#
|
860
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
861
|
+
#
|
862
|
+
def stop_with_http_info(resource_group_name, workspace_name, integration_runtime_name, custom_headers:nil)
|
863
|
+
stop_async(resource_group_name, workspace_name, integration_runtime_name, custom_headers:custom_headers).value!
|
864
|
+
end
|
865
|
+
|
866
|
+
#
|
867
|
+
# Stop integration runtime
|
868
|
+
#
|
869
|
+
# Stop an integration runtime
|
870
|
+
#
|
871
|
+
# @param resource_group_name [String] The name of the resource group. The name
|
872
|
+
# is case insensitive.
|
873
|
+
# @param workspace_name [String] The name of the workspace
|
874
|
+
# @param integration_runtime_name [String] Integration runtime name
|
875
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
876
|
+
# to the HTTP request.
|
877
|
+
#
|
878
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
879
|
+
#
|
880
|
+
def stop_async(resource_group_name, workspace_name, integration_runtime_name, custom_headers:nil)
|
881
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
882
|
+
fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1
|
883
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
884
|
+
fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1
|
885
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
886
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
|
887
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
|
888
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
|
889
|
+
fail ArgumentError, 'workspace_name is nil' if workspace_name.nil?
|
890
|
+
fail ArgumentError, 'integration_runtime_name is nil' if integration_runtime_name.nil?
|
891
|
+
|
892
|
+
|
893
|
+
request_headers = {}
|
894
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
895
|
+
|
896
|
+
# Set Headers
|
897
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
898
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
899
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/integrationRuntimes/{integrationRuntimeName}/stop'
|
900
|
+
|
901
|
+
request_url = @base_url || @client.base_url
|
902
|
+
|
903
|
+
options = {
|
904
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
905
|
+
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'workspaceName' => workspace_name,'integrationRuntimeName' => integration_runtime_name},
|
906
|
+
query_params: {'api-version' => @client.api_version},
|
907
|
+
headers: request_headers.merge(custom_headers || {}),
|
908
|
+
base_url: request_url
|
909
|
+
}
|
910
|
+
promise = @client.make_request_async(:post, path_template, options)
|
911
|
+
|
912
|
+
promise = promise.then do |result|
|
913
|
+
http_response = result.response
|
914
|
+
status_code = http_response.status
|
915
|
+
response_content = http_response.body
|
916
|
+
unless status_code == 200 || status_code == 202
|
917
|
+
error_model = JSON.load(response_content)
|
918
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
919
|
+
end
|
920
|
+
|
921
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
922
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
923
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
924
|
+
|
925
|
+
result
|
926
|
+
end
|
927
|
+
|
928
|
+
promise.execute
|
929
|
+
end
|
930
|
+
|
931
|
+
#
|
932
|
+
# List integration runtimes
|
933
|
+
#
|
934
|
+
# List all integration runtimes
|
935
|
+
#
|
936
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
937
|
+
# to List operation.
|
938
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
939
|
+
# will be added to the HTTP request.
|
940
|
+
#
|
941
|
+
# @return [IntegrationRuntimeListResponse] operation results.
|
942
|
+
#
|
943
|
+
def list_by_workspace_next(next_page_link, custom_headers:nil)
|
944
|
+
response = list_by_workspace_next_async(next_page_link, custom_headers:custom_headers).value!
|
945
|
+
response.body unless response.nil?
|
946
|
+
end
|
947
|
+
|
948
|
+
#
|
949
|
+
# List integration runtimes
|
950
|
+
#
|
951
|
+
# List all integration runtimes
|
952
|
+
#
|
953
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
954
|
+
# to List operation.
|
955
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
956
|
+
# will be added to the HTTP request.
|
957
|
+
#
|
958
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
959
|
+
#
|
960
|
+
def list_by_workspace_next_with_http_info(next_page_link, custom_headers:nil)
|
961
|
+
list_by_workspace_next_async(next_page_link, custom_headers:custom_headers).value!
|
962
|
+
end
|
963
|
+
|
964
|
+
#
|
965
|
+
# List integration runtimes
|
966
|
+
#
|
967
|
+
# List all integration runtimes
|
968
|
+
#
|
969
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
970
|
+
# to List operation.
|
971
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
972
|
+
# to the HTTP request.
|
973
|
+
#
|
974
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
975
|
+
#
|
976
|
+
def list_by_workspace_next_async(next_page_link, custom_headers:nil)
|
977
|
+
fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
|
978
|
+
|
979
|
+
|
980
|
+
request_headers = {}
|
981
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
982
|
+
|
983
|
+
# Set Headers
|
984
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
985
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
986
|
+
path_template = '{nextLink}'
|
987
|
+
|
988
|
+
request_url = @base_url || @client.base_url
|
989
|
+
|
990
|
+
options = {
|
991
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
992
|
+
skip_encoding_path_params: {'nextLink' => next_page_link},
|
993
|
+
headers: request_headers.merge(custom_headers || {}),
|
994
|
+
base_url: request_url
|
995
|
+
}
|
996
|
+
promise = @client.make_request_async(:get, path_template, options)
|
997
|
+
|
998
|
+
promise = promise.then do |result|
|
999
|
+
http_response = result.response
|
1000
|
+
status_code = http_response.status
|
1001
|
+
response_content = http_response.body
|
1002
|
+
unless status_code == 200
|
1003
|
+
error_model = JSON.load(response_content)
|
1004
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
1005
|
+
end
|
1006
|
+
|
1007
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
1008
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
1009
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
1010
|
+
# Deserialize Response
|
1011
|
+
if status_code == 200
|
1012
|
+
begin
|
1013
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
1014
|
+
result_mapper = Azure::Synapse::Mgmt::V2019_06_01_preview::Models::IntegrationRuntimeListResponse.mapper()
|
1015
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
1016
|
+
rescue Exception => e
|
1017
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
1018
|
+
end
|
1019
|
+
end
|
1020
|
+
|
1021
|
+
result
|
1022
|
+
end
|
1023
|
+
|
1024
|
+
promise.execute
|
1025
|
+
end
|
1026
|
+
|
1027
|
+
#
|
1028
|
+
# List integration runtimes
|
1029
|
+
#
|
1030
|
+
# List all integration runtimes
|
1031
|
+
#
|
1032
|
+
# @param resource_group_name [String] The name of the resource group. The name
|
1033
|
+
# is case insensitive.
|
1034
|
+
# @param workspace_name [String] The name of the workspace
|
1035
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1036
|
+
# will be added to the HTTP request.
|
1037
|
+
#
|
1038
|
+
# @return [IntegrationRuntimeListResponse] which provide lazy access to pages
|
1039
|
+
# of the response.
|
1040
|
+
#
|
1041
|
+
def list_by_workspace_as_lazy(resource_group_name, workspace_name, custom_headers:nil)
|
1042
|
+
response = list_by_workspace_async(resource_group_name, workspace_name, custom_headers:custom_headers).value!
|
1043
|
+
unless response.nil?
|
1044
|
+
page = response.body
|
1045
|
+
page.next_method = Proc.new do |next_page_link|
|
1046
|
+
list_by_workspace_next_async(next_page_link, custom_headers:custom_headers)
|
1047
|
+
end
|
1048
|
+
page
|
1049
|
+
end
|
1050
|
+
end
|
1051
|
+
|
1052
|
+
end
|
1053
|
+
end
|