azure_mgmt_automation 0.14.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/LICENSE.txt +21 -0
- data/lib/azure_mgmt_automation.rb +6 -0
- data/lib/generated/azure_mgmt_automation.rb +183 -0
- data/lib/generated/azure_mgmt_automation/activity_operations.rb +332 -0
- data/lib/generated/azure_mgmt_automation/agent_registration_information.rb +223 -0
- data/lib/generated/azure_mgmt_automation/automation_account_operations.rb +822 -0
- data/lib/generated/azure_mgmt_automation/automation_client.rb +245 -0
- data/lib/generated/azure_mgmt_automation/certificate_operations.rb +642 -0
- data/lib/generated/azure_mgmt_automation/connection_operations.rb +653 -0
- data/lib/generated/azure_mgmt_automation/connection_type_operations.rb +528 -0
- data/lib/generated/azure_mgmt_automation/credential_operations.rb +642 -0
- data/lib/generated/azure_mgmt_automation/dsc_compilation_job_operations.rb +534 -0
- data/lib/generated/azure_mgmt_automation/dsc_configuration_operations.rb +629 -0
- data/lib/generated/azure_mgmt_automation/dsc_node_configuration_operations.rb +532 -0
- data/lib/generated/azure_mgmt_automation/dsc_node_operations.rb +530 -0
- data/lib/generated/azure_mgmt_automation/fields.rb +124 -0
- data/lib/generated/azure_mgmt_automation/hybrid_runbook_worker_group_operations.rb +524 -0
- data/lib/generated/azure_mgmt_automation/job_operations.rb +888 -0
- data/lib/generated/azure_mgmt_automation/job_schedule_operations.rb +515 -0
- data/lib/generated/azure_mgmt_automation/job_stream_operations.rb +333 -0
- data/lib/generated/azure_mgmt_automation/models/activity.rb +133 -0
- data/lib/generated/azure_mgmt_automation/models/activity_list_result.rb +94 -0
- data/lib/generated/azure_mgmt_automation/models/activity_output_type.rb +54 -0
- data/lib/generated/azure_mgmt_automation/models/activity_parameter.rb +129 -0
- data/lib/generated/azure_mgmt_automation/models/activity_parameter_set.rb +63 -0
- data/lib/generated/azure_mgmt_automation/models/advanced_schedule.rb +89 -0
- data/lib/generated/azure_mgmt_automation/models/advanced_schedule_monthly_occurrence.rb +58 -0
- data/lib/generated/azure_mgmt_automation/models/agent_registration.rb +76 -0
- data/lib/generated/azure_mgmt_automation/models/agent_registration_key_name.rb +16 -0
- data/lib/generated/azure_mgmt_automation/models/agent_registration_keys.rb +54 -0
- data/lib/generated/azure_mgmt_automation/models/agent_registration_regenerate_key_parameter.rb +84 -0
- data/lib/generated/azure_mgmt_automation/models/automation_account.rb +154 -0
- data/lib/generated/azure_mgmt_automation/models/automation_account_create_or_update_parameters.rb +85 -0
- data/lib/generated/azure_mgmt_automation/models/automation_account_list_result.rb +94 -0
- data/lib/generated/azure_mgmt_automation/models/automation_account_state.rb +17 -0
- data/lib/generated/azure_mgmt_automation/models/automation_account_update_parameters.rb +83 -0
- data/lib/generated/azure_mgmt_automation/models/certificate.rb +121 -0
- data/lib/generated/azure_mgmt_automation/models/certificate_create_or_update_parameters.rb +87 -0
- data/lib/generated/azure_mgmt_automation/models/certificate_list_result.rb +94 -0
- data/lib/generated/azure_mgmt_automation/models/certificate_update_parameters.rb +54 -0
- data/lib/generated/azure_mgmt_automation/models/connection.rb +119 -0
- data/lib/generated/azure_mgmt_automation/models/connection_create_or_update_parameters.rb +84 -0
- data/lib/generated/azure_mgmt_automation/models/connection_list_result.rb +94 -0
- data/lib/generated/azure_mgmt_automation/models/connection_type.rb +118 -0
- data/lib/generated/azure_mgmt_automation/models/connection_type_association_property.rb +44 -0
- data/lib/generated/azure_mgmt_automation/models/connection_type_create_or_update_parameters.rb +75 -0
- data/lib/generated/azure_mgmt_automation/models/connection_type_list_result.rb +95 -0
- data/lib/generated/azure_mgmt_automation/models/connection_update_parameters.rb +72 -0
- data/lib/generated/azure_mgmt_automation/models/content_hash.rb +55 -0
- data/lib/generated/azure_mgmt_automation/models/content_link.rb +65 -0
- data/lib/generated/azure_mgmt_automation/models/content_source.rb +77 -0
- data/lib/generated/azure_mgmt_automation/models/content_source_type.rb +16 -0
- data/lib/generated/azure_mgmt_automation/models/credential.rb +98 -0
- data/lib/generated/azure_mgmt_automation/models/credential_create_or_update_parameters.rb +74 -0
- data/lib/generated/azure_mgmt_automation/models/credential_list_result.rb +94 -0
- data/lib/generated/azure_mgmt_automation/models/credential_update_parameters.rb +74 -0
- data/lib/generated/azure_mgmt_automation/models/dsc_compilation_job.rb +186 -0
- data/lib/generated/azure_mgmt_automation/models/dsc_compilation_job_create_parameters.rb +102 -0
- data/lib/generated/azure_mgmt_automation/models/dsc_compilation_job_list_result.rb +95 -0
- data/lib/generated/azure_mgmt_automation/models/dsc_configuration.rb +193 -0
- data/lib/generated/azure_mgmt_automation/models/dsc_configuration_association_property.rb +44 -0
- data/lib/generated/azure_mgmt_automation/models/dsc_configuration_create_or_update_parameters.rb +132 -0
- data/lib/generated/azure_mgmt_automation/models/dsc_configuration_list_result.rb +95 -0
- data/lib/generated/azure_mgmt_automation/models/dsc_configuration_parameter.rb +75 -0
- data/lib/generated/azure_mgmt_automation/models/dsc_configuration_provisioning_state.rb +15 -0
- data/lib/generated/azure_mgmt_automation/models/dsc_configuration_state.rb +17 -0
- data/lib/generated/azure_mgmt_automation/models/dsc_meta_configuration.rb +111 -0
- data/lib/generated/azure_mgmt_automation/models/dsc_node.rb +161 -0
- data/lib/generated/azure_mgmt_automation/models/dsc_node_configuration.rb +86 -0
- data/lib/generated/azure_mgmt_automation/models/dsc_node_configuration_association_property.rb +44 -0
- data/lib/generated/azure_mgmt_automation/models/dsc_node_configuration_create_or_update_parameters.rb +69 -0
- data/lib/generated/azure_mgmt_automation/models/dsc_node_configuration_list_result.rb +95 -0
- data/lib/generated/azure_mgmt_automation/models/dsc_node_list_result.rb +94 -0
- data/lib/generated/azure_mgmt_automation/models/dsc_node_report.rb +265 -0
- data/lib/generated/azure_mgmt_automation/models/dsc_node_report_list_result.rb +94 -0
- data/lib/generated/azure_mgmt_automation/models/dsc_node_update_parameters.rb +56 -0
- data/lib/generated/azure_mgmt_automation/models/dsc_report_error.rb +95 -0
- data/lib/generated/azure_mgmt_automation/models/dsc_report_resource.rb +143 -0
- data/lib/generated/azure_mgmt_automation/models/dsc_report_resource_navigation.rb +44 -0
- data/lib/generated/azure_mgmt_automation/models/error_response.rb +54 -0
- data/lib/generated/azure_mgmt_automation/models/field_definition.rb +67 -0
- data/lib/generated/azure_mgmt_automation/models/http_status_code.rb +61 -0
- data/lib/generated/azure_mgmt_automation/models/hybrid_runbook_worker.rb +65 -0
- data/lib/generated/azure_mgmt_automation/models/hybrid_runbook_worker_group.rb +85 -0
- data/lib/generated/azure_mgmt_automation/models/hybrid_runbook_worker_group_update_parameters.rb +46 -0
- data/lib/generated/azure_mgmt_automation/models/hybrid_runbook_worker_groups_list_result.rb +95 -0
- data/lib/generated/azure_mgmt_automation/models/job.rb +188 -0
- data/lib/generated/azure_mgmt_automation/models/job_create_parameters.rb +112 -0
- data/lib/generated/azure_mgmt_automation/models/job_list_result.rb +94 -0
- data/lib/generated/azure_mgmt_automation/models/job_schedule.rb +105 -0
- data/lib/generated/azure_mgmt_automation/models/job_schedule_create_parameters.rb +84 -0
- data/lib/generated/azure_mgmt_automation/models/job_schedule_list_result.rb +94 -0
- data/lib/generated/azure_mgmt_automation/models/job_status.rb +27 -0
- data/lib/generated/azure_mgmt_automation/models/job_stream.rb +113 -0
- data/lib/generated/azure_mgmt_automation/models/job_stream_list_result.rb +94 -0
- data/lib/generated/azure_mgmt_automation/models/job_stream_type.rb +21 -0
- data/lib/generated/azure_mgmt_automation/models/module_create_or_update_parameters.rb +83 -0
- data/lib/generated/azure_mgmt_automation/models/module_error_info.rb +54 -0
- data/lib/generated/azure_mgmt_automation/models/module_list_result.rb +94 -0
- data/lib/generated/azure_mgmt_automation/models/module_model.rb +198 -0
- data/lib/generated/azure_mgmt_automation/models/module_provisioning_state.rb +30 -0
- data/lib/generated/azure_mgmt_automation/models/module_update_parameters.rb +83 -0
- data/lib/generated/azure_mgmt_automation/models/operation.rb +55 -0
- data/lib/generated/azure_mgmt_automation/models/operation_display.rb +65 -0
- data/lib/generated/azure_mgmt_automation/models/operation_list_result.rb +53 -0
- data/lib/generated/azure_mgmt_automation/models/resource.rb +94 -0
- data/lib/generated/azure_mgmt_automation/models/run_as_credential_association_property.rb +44 -0
- data/lib/generated/azure_mgmt_automation/models/runbook.rb +263 -0
- data/lib/generated/azure_mgmt_automation/models/runbook_association_property.rb +44 -0
- data/lib/generated/azure_mgmt_automation/models/runbook_create_or_update_draft_parameters.rb +44 -0
- data/lib/generated/azure_mgmt_automation/models/runbook_create_or_update_draft_properties.rb +99 -0
- data/lib/generated/azure_mgmt_automation/models/runbook_create_or_update_parameters.rb +147 -0
- data/lib/generated/azure_mgmt_automation/models/runbook_draft.rb +112 -0
- data/lib/generated/azure_mgmt_automation/models/runbook_draft_undo_edit_result.rb +68 -0
- data/lib/generated/azure_mgmt_automation/models/runbook_list_result.rb +94 -0
- data/lib/generated/azure_mgmt_automation/models/runbook_parameter.rb +75 -0
- data/lib/generated/azure_mgmt_automation/models/runbook_provisioning_state.rb +15 -0
- data/lib/generated/azure_mgmt_automation/models/runbook_state.rb +17 -0
- data/lib/generated/azure_mgmt_automation/models/runbook_type_enum.rb +20 -0
- data/lib/generated/azure_mgmt_automation/models/runbook_update_parameters.rb +113 -0
- data/lib/generated/azure_mgmt_automation/models/schedule.rb +199 -0
- data/lib/generated/azure_mgmt_automation/models/schedule_association_property.rb +44 -0
- data/lib/generated/azure_mgmt_automation/models/schedule_create_or_update_parameters.rb +116 -0
- data/lib/generated/azure_mgmt_automation/models/schedule_day.rb +21 -0
- data/lib/generated/azure_mgmt_automation/models/schedule_frequency.rb +19 -0
- data/lib/generated/azure_mgmt_automation/models/schedule_list_result.rb +94 -0
- data/lib/generated/azure_mgmt_automation/models/schedule_update_parameters.rb +65 -0
- data/lib/generated/azure_mgmt_automation/models/sku.rb +65 -0
- data/lib/generated/azure_mgmt_automation/models/sku_name_enum.rb +16 -0
- data/lib/generated/azure_mgmt_automation/models/statistics.rb +89 -0
- data/lib/generated/azure_mgmt_automation/models/statistics_list_result.rb +52 -0
- data/lib/generated/azure_mgmt_automation/models/sub_resource.rb +44 -0
- data/lib/generated/azure_mgmt_automation/models/test_job.rb +144 -0
- data/lib/generated/azure_mgmt_automation/models/test_job_create_parameters.rb +73 -0
- data/lib/generated/azure_mgmt_automation/models/type_field.rb +54 -0
- data/lib/generated/azure_mgmt_automation/models/type_field_list_result.rb +52 -0
- data/lib/generated/azure_mgmt_automation/models/usage.rb +95 -0
- data/lib/generated/azure_mgmt_automation/models/usage_counter_name.rb +54 -0
- data/lib/generated/azure_mgmt_automation/models/usage_list_result.rb +52 -0
- data/lib/generated/azure_mgmt_automation/models/variable.rb +104 -0
- data/lib/generated/azure_mgmt_automation/models/variable_create_or_update_parameters.rb +74 -0
- data/lib/generated/azure_mgmt_automation/models/variable_list_result.rb +94 -0
- data/lib/generated/azure_mgmt_automation/models/variable_update_parameters.rb +64 -0
- data/lib/generated/azure_mgmt_automation/models/webhook.rb +168 -0
- data/lib/generated/azure_mgmt_automation/models/webhook_create_or_update_parameters.rb +115 -0
- data/lib/generated/azure_mgmt_automation/models/webhook_list_result.rb +94 -0
- data/lib/generated/azure_mgmt_automation/models/webhook_update_parameters.rb +94 -0
- data/lib/generated/azure_mgmt_automation/module_definition.rb +8 -0
- data/lib/generated/azure_mgmt_automation/module_model_operations.rb +633 -0
- data/lib/generated/azure_mgmt_automation/node_reports.rb +438 -0
- data/lib/generated/azure_mgmt_automation/object_data_types.rb +219 -0
- data/lib/generated/azure_mgmt_automation/operations.rb +106 -0
- data/lib/generated/azure_mgmt_automation/runbook_draft_operations.rb +605 -0
- data/lib/generated/azure_mgmt_automation/runbook_operations.rb +719 -0
- data/lib/generated/azure_mgmt_automation/schedule_operations.rb +626 -0
- data/lib/generated/azure_mgmt_automation/statistics_operations.rb +119 -0
- data/lib/generated/azure_mgmt_automation/test_job_streams.rb +333 -0
- data/lib/generated/azure_mgmt_automation/test_jobs.rb +486 -0
- data/lib/generated/azure_mgmt_automation/usages.rb +116 -0
- data/lib/generated/azure_mgmt_automation/variable_operations.rb +636 -0
- data/lib/generated/azure_mgmt_automation/version.rb +8 -0
- data/lib/generated/azure_mgmt_automation/webhook_operations.rb +737 -0
- metadata +275 -0
@@ -0,0 +1,124 @@
|
|
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::ARM::Automation
|
7
|
+
#
|
8
|
+
# Automation Client
|
9
|
+
#
|
10
|
+
class Fields
|
11
|
+
include MsRestAzure
|
12
|
+
|
13
|
+
#
|
14
|
+
# Creates and initializes a new instance of the Fields class.
|
15
|
+
# @param client service class for accessing basic functionality.
|
16
|
+
#
|
17
|
+
def initialize(client)
|
18
|
+
@client = client
|
19
|
+
end
|
20
|
+
|
21
|
+
# @return [AutomationClient] reference to the AutomationClient
|
22
|
+
attr_reader :client
|
23
|
+
|
24
|
+
#
|
25
|
+
# Retrieve a list of fields of a given type identified by module name.
|
26
|
+
#
|
27
|
+
# @param resource_group_name [String] The resource group name.
|
28
|
+
# @param automation_account_name [String] The automation account name.
|
29
|
+
# @param module_name [String] The name of module.
|
30
|
+
# @param type_name [String] The name of type.
|
31
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
32
|
+
# will be added to the HTTP request.
|
33
|
+
#
|
34
|
+
# @return [TypeFieldListResult] operation results.
|
35
|
+
#
|
36
|
+
def list_by_type(resource_group_name, automation_account_name, module_name, type_name, custom_headers = nil)
|
37
|
+
response = list_by_type_async(resource_group_name, automation_account_name, module_name, type_name, custom_headers).value!
|
38
|
+
response.body unless response.nil?
|
39
|
+
end
|
40
|
+
|
41
|
+
#
|
42
|
+
# Retrieve a list of fields of a given type identified by module name.
|
43
|
+
#
|
44
|
+
# @param resource_group_name [String] The resource group name.
|
45
|
+
# @param automation_account_name [String] The automation account name.
|
46
|
+
# @param module_name [String] The name of module.
|
47
|
+
# @param type_name [String] The name of type.
|
48
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
49
|
+
# will be added to the HTTP request.
|
50
|
+
#
|
51
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
52
|
+
#
|
53
|
+
def list_by_type_with_http_info(resource_group_name, automation_account_name, module_name, type_name, custom_headers = nil)
|
54
|
+
list_by_type_async(resource_group_name, automation_account_name, module_name, type_name, custom_headers).value!
|
55
|
+
end
|
56
|
+
|
57
|
+
#
|
58
|
+
# Retrieve a list of fields of a given type identified by module name.
|
59
|
+
#
|
60
|
+
# @param resource_group_name [String] The resource group name.
|
61
|
+
# @param automation_account_name [String] The automation account name.
|
62
|
+
# @param module_name [String] The name of module.
|
63
|
+
# @param type_name [String] The name of type.
|
64
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
65
|
+
# to the HTTP request.
|
66
|
+
#
|
67
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
68
|
+
#
|
69
|
+
def list_by_type_async(resource_group_name, automation_account_name, module_name, type_name, custom_headers = nil)
|
70
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
71
|
+
fail ArgumentError, 'automation_account_name is nil' if automation_account_name.nil?
|
72
|
+
fail ArgumentError, 'module_name is nil' if module_name.nil?
|
73
|
+
fail ArgumentError, 'type_name is nil' if type_name.nil?
|
74
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
75
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
76
|
+
|
77
|
+
|
78
|
+
request_headers = {}
|
79
|
+
|
80
|
+
# Set Headers
|
81
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
82
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
83
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/modules/{moduleName}/types/{typeName}/fields'
|
84
|
+
|
85
|
+
request_url = @base_url || @client.base_url
|
86
|
+
|
87
|
+
options = {
|
88
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
89
|
+
path_params: {'resourceGroupName' => resource_group_name,'automationAccountName' => automation_account_name,'moduleName' => module_name,'typeName' => type_name,'subscriptionId' => @client.subscription_id},
|
90
|
+
query_params: {'api-version' => @client.api_version},
|
91
|
+
headers: request_headers.merge(custom_headers || {}),
|
92
|
+
base_url: request_url
|
93
|
+
}
|
94
|
+
promise = @client.make_request_async(:get, path_template, options)
|
95
|
+
|
96
|
+
promise = promise.then do |result|
|
97
|
+
http_response = result.response
|
98
|
+
status_code = http_response.status
|
99
|
+
response_content = http_response.body
|
100
|
+
unless status_code == 200
|
101
|
+
error_model = JSON.load(response_content)
|
102
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
103
|
+
end
|
104
|
+
|
105
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
106
|
+
# Deserialize Response
|
107
|
+
if status_code == 200
|
108
|
+
begin
|
109
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
110
|
+
result_mapper = Azure::ARM::Automation::Models::TypeFieldListResult.mapper()
|
111
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
112
|
+
rescue Exception => e
|
113
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
114
|
+
end
|
115
|
+
end
|
116
|
+
|
117
|
+
result
|
118
|
+
end
|
119
|
+
|
120
|
+
promise.execute
|
121
|
+
end
|
122
|
+
|
123
|
+
end
|
124
|
+
end
|
@@ -0,0 +1,524 @@
|
|
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::ARM::Automation
|
7
|
+
#
|
8
|
+
# Automation Client
|
9
|
+
#
|
10
|
+
class HybridRunbookWorkerGroupOperations
|
11
|
+
include MsRestAzure
|
12
|
+
|
13
|
+
#
|
14
|
+
# Creates and initializes a new instance of the HybridRunbookWorkerGroupOperations class.
|
15
|
+
# @param client service class for accessing basic functionality.
|
16
|
+
#
|
17
|
+
def initialize(client)
|
18
|
+
@client = client
|
19
|
+
end
|
20
|
+
|
21
|
+
# @return [AutomationClient] reference to the AutomationClient
|
22
|
+
attr_reader :client
|
23
|
+
|
24
|
+
#
|
25
|
+
# Delete a hybrid runbook worker group.
|
26
|
+
#
|
27
|
+
# @param resource_group_name [String] The resource group name.
|
28
|
+
# @param automation_account_name [String] Automation account name.
|
29
|
+
# @param hybrid_runbook_worker_group_name [String] The hybrid runbook worker
|
30
|
+
# group name
|
31
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
32
|
+
# will be added to the HTTP request.
|
33
|
+
#
|
34
|
+
#
|
35
|
+
def delete(resource_group_name, automation_account_name, hybrid_runbook_worker_group_name, custom_headers = nil)
|
36
|
+
response = delete_async(resource_group_name, automation_account_name, hybrid_runbook_worker_group_name, custom_headers).value!
|
37
|
+
nil
|
38
|
+
end
|
39
|
+
|
40
|
+
#
|
41
|
+
# Delete a hybrid runbook worker group.
|
42
|
+
#
|
43
|
+
# @param resource_group_name [String] The resource group name.
|
44
|
+
# @param automation_account_name [String] Automation account name.
|
45
|
+
# @param hybrid_runbook_worker_group_name [String] The hybrid runbook worker
|
46
|
+
# group name
|
47
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
48
|
+
# will be added to the HTTP request.
|
49
|
+
#
|
50
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
51
|
+
#
|
52
|
+
def delete_with_http_info(resource_group_name, automation_account_name, hybrid_runbook_worker_group_name, custom_headers = nil)
|
53
|
+
delete_async(resource_group_name, automation_account_name, hybrid_runbook_worker_group_name, custom_headers).value!
|
54
|
+
end
|
55
|
+
|
56
|
+
#
|
57
|
+
# Delete a hybrid runbook worker group.
|
58
|
+
#
|
59
|
+
# @param resource_group_name [String] The resource group name.
|
60
|
+
# @param automation_account_name [String] Automation account name.
|
61
|
+
# @param hybrid_runbook_worker_group_name [String] The hybrid runbook worker
|
62
|
+
# group name
|
63
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
64
|
+
# to the HTTP request.
|
65
|
+
#
|
66
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
67
|
+
#
|
68
|
+
def delete_async(resource_group_name, automation_account_name, hybrid_runbook_worker_group_name, custom_headers = nil)
|
69
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
70
|
+
fail ArgumentError, 'automation_account_name is nil' if automation_account_name.nil?
|
71
|
+
fail ArgumentError, 'hybrid_runbook_worker_group_name is nil' if hybrid_runbook_worker_group_name.nil?
|
72
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
73
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
74
|
+
|
75
|
+
|
76
|
+
request_headers = {}
|
77
|
+
|
78
|
+
# Set Headers
|
79
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
80
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
81
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/hybridRunbookWorkerGroups/{hybridRunbookWorkerGroupName}'
|
82
|
+
|
83
|
+
request_url = @base_url || @client.base_url
|
84
|
+
|
85
|
+
options = {
|
86
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
87
|
+
path_params: {'resourceGroupName' => resource_group_name,'automationAccountName' => automation_account_name,'hybridRunbookWorkerGroupName' => hybrid_runbook_worker_group_name,'subscriptionId' => @client.subscription_id},
|
88
|
+
query_params: {'api-version' => @client.api_version},
|
89
|
+
headers: request_headers.merge(custom_headers || {}),
|
90
|
+
base_url: request_url
|
91
|
+
}
|
92
|
+
promise = @client.make_request_async(:delete, path_template, options)
|
93
|
+
|
94
|
+
promise = promise.then do |result|
|
95
|
+
http_response = result.response
|
96
|
+
status_code = http_response.status
|
97
|
+
response_content = http_response.body
|
98
|
+
unless status_code == 200
|
99
|
+
error_model = JSON.load(response_content)
|
100
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
101
|
+
end
|
102
|
+
|
103
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
104
|
+
|
105
|
+
result
|
106
|
+
end
|
107
|
+
|
108
|
+
promise.execute
|
109
|
+
end
|
110
|
+
|
111
|
+
#
|
112
|
+
# Retrieve a hybrid runbook worker group.
|
113
|
+
#
|
114
|
+
# @param resource_group_name [String] The resource group name.
|
115
|
+
# @param automation_account_name [String] The automation account name.
|
116
|
+
# @param hybrid_runbook_worker_group_name [String] The hybrid runbook worker
|
117
|
+
# group name
|
118
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
119
|
+
# will be added to the HTTP request.
|
120
|
+
#
|
121
|
+
# @return [HybridRunbookWorkerGroup] operation results.
|
122
|
+
#
|
123
|
+
def get(resource_group_name, automation_account_name, hybrid_runbook_worker_group_name, custom_headers = nil)
|
124
|
+
response = get_async(resource_group_name, automation_account_name, hybrid_runbook_worker_group_name, custom_headers).value!
|
125
|
+
response.body unless response.nil?
|
126
|
+
end
|
127
|
+
|
128
|
+
#
|
129
|
+
# Retrieve a hybrid runbook worker group.
|
130
|
+
#
|
131
|
+
# @param resource_group_name [String] The resource group name.
|
132
|
+
# @param automation_account_name [String] The automation account name.
|
133
|
+
# @param hybrid_runbook_worker_group_name [String] The hybrid runbook worker
|
134
|
+
# group name
|
135
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
136
|
+
# will be added to the HTTP request.
|
137
|
+
#
|
138
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
139
|
+
#
|
140
|
+
def get_with_http_info(resource_group_name, automation_account_name, hybrid_runbook_worker_group_name, custom_headers = nil)
|
141
|
+
get_async(resource_group_name, automation_account_name, hybrid_runbook_worker_group_name, custom_headers).value!
|
142
|
+
end
|
143
|
+
|
144
|
+
#
|
145
|
+
# Retrieve a hybrid runbook worker group.
|
146
|
+
#
|
147
|
+
# @param resource_group_name [String] The resource group name.
|
148
|
+
# @param automation_account_name [String] The automation account name.
|
149
|
+
# @param hybrid_runbook_worker_group_name [String] The hybrid runbook worker
|
150
|
+
# group name
|
151
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
152
|
+
# to the HTTP request.
|
153
|
+
#
|
154
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
155
|
+
#
|
156
|
+
def get_async(resource_group_name, automation_account_name, hybrid_runbook_worker_group_name, custom_headers = nil)
|
157
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
158
|
+
fail ArgumentError, 'automation_account_name is nil' if automation_account_name.nil?
|
159
|
+
fail ArgumentError, 'hybrid_runbook_worker_group_name is nil' if hybrid_runbook_worker_group_name.nil?
|
160
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
161
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
162
|
+
|
163
|
+
|
164
|
+
request_headers = {}
|
165
|
+
|
166
|
+
# Set Headers
|
167
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
168
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
169
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/hybridRunbookWorkerGroups/{hybridRunbookWorkerGroupName}'
|
170
|
+
|
171
|
+
request_url = @base_url || @client.base_url
|
172
|
+
|
173
|
+
options = {
|
174
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
175
|
+
path_params: {'resourceGroupName' => resource_group_name,'automationAccountName' => automation_account_name,'hybridRunbookWorkerGroupName' => hybrid_runbook_worker_group_name,'subscriptionId' => @client.subscription_id},
|
176
|
+
query_params: {'api-version' => @client.api_version},
|
177
|
+
headers: request_headers.merge(custom_headers || {}),
|
178
|
+
base_url: request_url
|
179
|
+
}
|
180
|
+
promise = @client.make_request_async(:get, path_template, options)
|
181
|
+
|
182
|
+
promise = promise.then do |result|
|
183
|
+
http_response = result.response
|
184
|
+
status_code = http_response.status
|
185
|
+
response_content = http_response.body
|
186
|
+
unless status_code == 200
|
187
|
+
error_model = JSON.load(response_content)
|
188
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
189
|
+
end
|
190
|
+
|
191
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
192
|
+
# Deserialize Response
|
193
|
+
if status_code == 200
|
194
|
+
begin
|
195
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
196
|
+
result_mapper = Azure::ARM::Automation::Models::HybridRunbookWorkerGroup.mapper()
|
197
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
198
|
+
rescue Exception => e
|
199
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
200
|
+
end
|
201
|
+
end
|
202
|
+
|
203
|
+
result
|
204
|
+
end
|
205
|
+
|
206
|
+
promise.execute
|
207
|
+
end
|
208
|
+
|
209
|
+
#
|
210
|
+
# Update a hybrid runbook worker group.
|
211
|
+
#
|
212
|
+
# @param resource_group_name [String] The resource group name.
|
213
|
+
# @param automation_account_name [String] The automation account name.
|
214
|
+
# @param hybrid_runbook_worker_group_name [String] The hybrid runbook worker
|
215
|
+
# group name
|
216
|
+
# @param parameters [HybridRunbookWorkerGroupUpdateParameters] The hybrid
|
217
|
+
# runbook worker group
|
218
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
219
|
+
# will be added to the HTTP request.
|
220
|
+
#
|
221
|
+
# @return [HybridRunbookWorkerGroup] operation results.
|
222
|
+
#
|
223
|
+
def update(resource_group_name, automation_account_name, hybrid_runbook_worker_group_name, parameters, custom_headers = nil)
|
224
|
+
response = update_async(resource_group_name, automation_account_name, hybrid_runbook_worker_group_name, parameters, custom_headers).value!
|
225
|
+
response.body unless response.nil?
|
226
|
+
end
|
227
|
+
|
228
|
+
#
|
229
|
+
# Update a hybrid runbook worker group.
|
230
|
+
#
|
231
|
+
# @param resource_group_name [String] The resource group name.
|
232
|
+
# @param automation_account_name [String] The automation account name.
|
233
|
+
# @param hybrid_runbook_worker_group_name [String] The hybrid runbook worker
|
234
|
+
# group name
|
235
|
+
# @param parameters [HybridRunbookWorkerGroupUpdateParameters] The hybrid
|
236
|
+
# runbook worker group
|
237
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
238
|
+
# will be added to the HTTP request.
|
239
|
+
#
|
240
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
241
|
+
#
|
242
|
+
def update_with_http_info(resource_group_name, automation_account_name, hybrid_runbook_worker_group_name, parameters, custom_headers = nil)
|
243
|
+
update_async(resource_group_name, automation_account_name, hybrid_runbook_worker_group_name, parameters, custom_headers).value!
|
244
|
+
end
|
245
|
+
|
246
|
+
#
|
247
|
+
# Update a hybrid runbook worker group.
|
248
|
+
#
|
249
|
+
# @param resource_group_name [String] The resource group name.
|
250
|
+
# @param automation_account_name [String] The automation account name.
|
251
|
+
# @param hybrid_runbook_worker_group_name [String] The hybrid runbook worker
|
252
|
+
# group name
|
253
|
+
# @param parameters [HybridRunbookWorkerGroupUpdateParameters] The hybrid
|
254
|
+
# runbook worker group
|
255
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
256
|
+
# to the HTTP request.
|
257
|
+
#
|
258
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
259
|
+
#
|
260
|
+
def update_async(resource_group_name, automation_account_name, hybrid_runbook_worker_group_name, parameters, custom_headers = nil)
|
261
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
262
|
+
fail ArgumentError, 'automation_account_name is nil' if automation_account_name.nil?
|
263
|
+
fail ArgumentError, 'hybrid_runbook_worker_group_name is nil' if hybrid_runbook_worker_group_name.nil?
|
264
|
+
fail ArgumentError, 'parameters is nil' if parameters.nil?
|
265
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
266
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
267
|
+
|
268
|
+
|
269
|
+
request_headers = {}
|
270
|
+
|
271
|
+
# Set Headers
|
272
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
273
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
274
|
+
|
275
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
276
|
+
|
277
|
+
# Serialize Request
|
278
|
+
request_mapper = Azure::ARM::Automation::Models::HybridRunbookWorkerGroupUpdateParameters.mapper()
|
279
|
+
request_content = @client.serialize(request_mapper, parameters)
|
280
|
+
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
281
|
+
|
282
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/hybridRunbookWorkerGroups/{hybridRunbookWorkerGroupName}'
|
283
|
+
|
284
|
+
request_url = @base_url || @client.base_url
|
285
|
+
|
286
|
+
options = {
|
287
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
288
|
+
path_params: {'resourceGroupName' => resource_group_name,'automationAccountName' => automation_account_name,'hybridRunbookWorkerGroupName' => hybrid_runbook_worker_group_name,'subscriptionId' => @client.subscription_id},
|
289
|
+
query_params: {'api-version' => @client.api_version},
|
290
|
+
body: request_content,
|
291
|
+
headers: request_headers.merge(custom_headers || {}),
|
292
|
+
base_url: request_url
|
293
|
+
}
|
294
|
+
promise = @client.make_request_async(:patch, path_template, options)
|
295
|
+
|
296
|
+
promise = promise.then do |result|
|
297
|
+
http_response = result.response
|
298
|
+
status_code = http_response.status
|
299
|
+
response_content = http_response.body
|
300
|
+
unless status_code == 200
|
301
|
+
error_model = JSON.load(response_content)
|
302
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
303
|
+
end
|
304
|
+
|
305
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
306
|
+
# Deserialize Response
|
307
|
+
if status_code == 200
|
308
|
+
begin
|
309
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
310
|
+
result_mapper = Azure::ARM::Automation::Models::HybridRunbookWorkerGroup.mapper()
|
311
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
312
|
+
rescue Exception => e
|
313
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
314
|
+
end
|
315
|
+
end
|
316
|
+
|
317
|
+
result
|
318
|
+
end
|
319
|
+
|
320
|
+
promise.execute
|
321
|
+
end
|
322
|
+
|
323
|
+
#
|
324
|
+
# Retrieve a list of hybrid runbook worker groups.
|
325
|
+
#
|
326
|
+
# @param resource_group_name [String] The resource group name.
|
327
|
+
# @param automation_account_name [String] The automation account name.
|
328
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
329
|
+
# will be added to the HTTP request.
|
330
|
+
#
|
331
|
+
# @return [Array<HybridRunbookWorkerGroup>] operation results.
|
332
|
+
#
|
333
|
+
def list_by_automation_account(resource_group_name, automation_account_name, custom_headers = nil)
|
334
|
+
first_page = list_by_automation_account_as_lazy(resource_group_name, automation_account_name, custom_headers)
|
335
|
+
first_page.get_all_items
|
336
|
+
end
|
337
|
+
|
338
|
+
#
|
339
|
+
# Retrieve a list of hybrid runbook worker groups.
|
340
|
+
#
|
341
|
+
# @param resource_group_name [String] The resource group name.
|
342
|
+
# @param automation_account_name [String] The automation account name.
|
343
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
344
|
+
# will be added to the HTTP request.
|
345
|
+
#
|
346
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
347
|
+
#
|
348
|
+
def list_by_automation_account_with_http_info(resource_group_name, automation_account_name, custom_headers = nil)
|
349
|
+
list_by_automation_account_async(resource_group_name, automation_account_name, custom_headers).value!
|
350
|
+
end
|
351
|
+
|
352
|
+
#
|
353
|
+
# Retrieve a list of hybrid runbook worker groups.
|
354
|
+
#
|
355
|
+
# @param resource_group_name [String] The resource group name.
|
356
|
+
# @param automation_account_name [String] The automation account name.
|
357
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
358
|
+
# to the HTTP request.
|
359
|
+
#
|
360
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
361
|
+
#
|
362
|
+
def list_by_automation_account_async(resource_group_name, automation_account_name, custom_headers = nil)
|
363
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
364
|
+
fail ArgumentError, 'automation_account_name is nil' if automation_account_name.nil?
|
365
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
366
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
367
|
+
|
368
|
+
|
369
|
+
request_headers = {}
|
370
|
+
|
371
|
+
# Set Headers
|
372
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
373
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
374
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/hybridRunbookWorkerGroups'
|
375
|
+
|
376
|
+
request_url = @base_url || @client.base_url
|
377
|
+
|
378
|
+
options = {
|
379
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
380
|
+
path_params: {'resourceGroupName' => resource_group_name,'automationAccountName' => automation_account_name,'subscriptionId' => @client.subscription_id},
|
381
|
+
query_params: {'api-version' => @client.api_version},
|
382
|
+
headers: request_headers.merge(custom_headers || {}),
|
383
|
+
base_url: request_url
|
384
|
+
}
|
385
|
+
promise = @client.make_request_async(:get, path_template, options)
|
386
|
+
|
387
|
+
promise = promise.then do |result|
|
388
|
+
http_response = result.response
|
389
|
+
status_code = http_response.status
|
390
|
+
response_content = http_response.body
|
391
|
+
unless status_code == 200
|
392
|
+
error_model = JSON.load(response_content)
|
393
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
394
|
+
end
|
395
|
+
|
396
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
397
|
+
# Deserialize Response
|
398
|
+
if status_code == 200
|
399
|
+
begin
|
400
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
401
|
+
result_mapper = Azure::ARM::Automation::Models::HybridRunbookWorkerGroupsListResult.mapper()
|
402
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
403
|
+
rescue Exception => e
|
404
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
405
|
+
end
|
406
|
+
end
|
407
|
+
|
408
|
+
result
|
409
|
+
end
|
410
|
+
|
411
|
+
promise.execute
|
412
|
+
end
|
413
|
+
|
414
|
+
#
|
415
|
+
# Retrieve a list of hybrid runbook worker groups.
|
416
|
+
#
|
417
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
418
|
+
# to List operation.
|
419
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
420
|
+
# will be added to the HTTP request.
|
421
|
+
#
|
422
|
+
# @return [HybridRunbookWorkerGroupsListResult] operation results.
|
423
|
+
#
|
424
|
+
def list_by_automation_account_next(next_page_link, custom_headers = nil)
|
425
|
+
response = list_by_automation_account_next_async(next_page_link, custom_headers).value!
|
426
|
+
response.body unless response.nil?
|
427
|
+
end
|
428
|
+
|
429
|
+
#
|
430
|
+
# Retrieve a list of hybrid runbook worker groups.
|
431
|
+
#
|
432
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
433
|
+
# to List operation.
|
434
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
435
|
+
# will be added to the HTTP request.
|
436
|
+
#
|
437
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
438
|
+
#
|
439
|
+
def list_by_automation_account_next_with_http_info(next_page_link, custom_headers = nil)
|
440
|
+
list_by_automation_account_next_async(next_page_link, custom_headers).value!
|
441
|
+
end
|
442
|
+
|
443
|
+
#
|
444
|
+
# Retrieve a list of hybrid runbook worker groups.
|
445
|
+
#
|
446
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
447
|
+
# to List operation.
|
448
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
449
|
+
# to the HTTP request.
|
450
|
+
#
|
451
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
452
|
+
#
|
453
|
+
def list_by_automation_account_next_async(next_page_link, custom_headers = nil)
|
454
|
+
fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
|
455
|
+
|
456
|
+
|
457
|
+
request_headers = {}
|
458
|
+
|
459
|
+
# Set Headers
|
460
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
461
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
462
|
+
path_template = '{nextLink}'
|
463
|
+
|
464
|
+
request_url = @base_url || @client.base_url
|
465
|
+
|
466
|
+
options = {
|
467
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
468
|
+
skip_encoding_path_params: {'nextLink' => next_page_link},
|
469
|
+
headers: request_headers.merge(custom_headers || {}),
|
470
|
+
base_url: request_url
|
471
|
+
}
|
472
|
+
promise = @client.make_request_async(:get, path_template, options)
|
473
|
+
|
474
|
+
promise = promise.then do |result|
|
475
|
+
http_response = result.response
|
476
|
+
status_code = http_response.status
|
477
|
+
response_content = http_response.body
|
478
|
+
unless status_code == 200
|
479
|
+
error_model = JSON.load(response_content)
|
480
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
481
|
+
end
|
482
|
+
|
483
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
484
|
+
# Deserialize Response
|
485
|
+
if status_code == 200
|
486
|
+
begin
|
487
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
488
|
+
result_mapper = Azure::ARM::Automation::Models::HybridRunbookWorkerGroupsListResult.mapper()
|
489
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
490
|
+
rescue Exception => e
|
491
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
492
|
+
end
|
493
|
+
end
|
494
|
+
|
495
|
+
result
|
496
|
+
end
|
497
|
+
|
498
|
+
promise.execute
|
499
|
+
end
|
500
|
+
|
501
|
+
#
|
502
|
+
# Retrieve a list of hybrid runbook worker groups.
|
503
|
+
#
|
504
|
+
# @param resource_group_name [String] The resource group name.
|
505
|
+
# @param automation_account_name [String] The automation account name.
|
506
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
507
|
+
# will be added to the HTTP request.
|
508
|
+
#
|
509
|
+
# @return [HybridRunbookWorkerGroupsListResult] which provide lazy access to
|
510
|
+
# pages of the response.
|
511
|
+
#
|
512
|
+
def list_by_automation_account_as_lazy(resource_group_name, automation_account_name, custom_headers = nil)
|
513
|
+
response = list_by_automation_account_async(resource_group_name, automation_account_name, custom_headers).value!
|
514
|
+
unless response.nil?
|
515
|
+
page = response.body
|
516
|
+
page.next_method = Proc.new do |next_page_link|
|
517
|
+
list_by_automation_account_next_async(next_page_link, custom_headers)
|
518
|
+
end
|
519
|
+
page
|
520
|
+
end
|
521
|
+
end
|
522
|
+
|
523
|
+
end
|
524
|
+
end
|