azure_mgmt_automation 0.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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,532 @@
|
|
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 DscNodeConfigurationOperations
|
11
|
+
include MsRestAzure
|
12
|
+
|
13
|
+
#
|
14
|
+
# Creates and initializes a new instance of the DscNodeConfigurationOperations 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 the Dsc node configurations by node configuration.
|
26
|
+
#
|
27
|
+
# @param resource_group_name [String] The resource group name.
|
28
|
+
# @param automation_account_name [String] The automation account name.
|
29
|
+
# @param node_configuration_name [String] The Dsc node configuration name.
|
30
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
31
|
+
# will be added to the HTTP request.
|
32
|
+
#
|
33
|
+
#
|
34
|
+
def delete(resource_group_name, automation_account_name, node_configuration_name, custom_headers = nil)
|
35
|
+
response = delete_async(resource_group_name, automation_account_name, node_configuration_name, custom_headers).value!
|
36
|
+
nil
|
37
|
+
end
|
38
|
+
|
39
|
+
#
|
40
|
+
# Delete the Dsc node configurations by node configuration.
|
41
|
+
#
|
42
|
+
# @param resource_group_name [String] The resource group name.
|
43
|
+
# @param automation_account_name [String] The automation account name.
|
44
|
+
# @param node_configuration_name [String] The Dsc node configuration name.
|
45
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
46
|
+
# will be added to the HTTP request.
|
47
|
+
#
|
48
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
49
|
+
#
|
50
|
+
def delete_with_http_info(resource_group_name, automation_account_name, node_configuration_name, custom_headers = nil)
|
51
|
+
delete_async(resource_group_name, automation_account_name, node_configuration_name, custom_headers).value!
|
52
|
+
end
|
53
|
+
|
54
|
+
#
|
55
|
+
# Delete the Dsc node configurations by node configuration.
|
56
|
+
#
|
57
|
+
# @param resource_group_name [String] The resource group name.
|
58
|
+
# @param automation_account_name [String] The automation account name.
|
59
|
+
# @param node_configuration_name [String] The Dsc node configuration name.
|
60
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
61
|
+
# to the HTTP request.
|
62
|
+
#
|
63
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
64
|
+
#
|
65
|
+
def delete_async(resource_group_name, automation_account_name, node_configuration_name, custom_headers = nil)
|
66
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
67
|
+
fail ArgumentError, 'automation_account_name is nil' if automation_account_name.nil?
|
68
|
+
fail ArgumentError, 'node_configuration_name is nil' if node_configuration_name.nil?
|
69
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
70
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
71
|
+
|
72
|
+
|
73
|
+
request_headers = {}
|
74
|
+
|
75
|
+
# Set Headers
|
76
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
77
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
78
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/nodeConfigurations/{nodeConfigurationName}'
|
79
|
+
|
80
|
+
request_url = @base_url || @client.base_url
|
81
|
+
|
82
|
+
options = {
|
83
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
84
|
+
path_params: {'resourceGroupName' => resource_group_name,'automationAccountName' => automation_account_name,'nodeConfigurationName' => node_configuration_name,'subscriptionId' => @client.subscription_id},
|
85
|
+
query_params: {'api-version' => @client.api_version},
|
86
|
+
headers: request_headers.merge(custom_headers || {}),
|
87
|
+
base_url: request_url
|
88
|
+
}
|
89
|
+
promise = @client.make_request_async(:delete, path_template, options)
|
90
|
+
|
91
|
+
promise = promise.then do |result|
|
92
|
+
http_response = result.response
|
93
|
+
status_code = http_response.status
|
94
|
+
response_content = http_response.body
|
95
|
+
unless status_code == 200
|
96
|
+
error_model = JSON.load(response_content)
|
97
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
98
|
+
end
|
99
|
+
|
100
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
101
|
+
|
102
|
+
result
|
103
|
+
end
|
104
|
+
|
105
|
+
promise.execute
|
106
|
+
end
|
107
|
+
|
108
|
+
#
|
109
|
+
# Retrieve the Dsc node configurations by node configuration.
|
110
|
+
#
|
111
|
+
# @param resource_group_name [String] The resource group name.
|
112
|
+
# @param automation_account_name [String] The automation account name.
|
113
|
+
# @param node_configuration_name [String] The Dsc node configuration name.
|
114
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
115
|
+
# will be added to the HTTP request.
|
116
|
+
#
|
117
|
+
# @return [DscNodeConfiguration] operation results.
|
118
|
+
#
|
119
|
+
def get(resource_group_name, automation_account_name, node_configuration_name, custom_headers = nil)
|
120
|
+
response = get_async(resource_group_name, automation_account_name, node_configuration_name, custom_headers).value!
|
121
|
+
response.body unless response.nil?
|
122
|
+
end
|
123
|
+
|
124
|
+
#
|
125
|
+
# Retrieve the Dsc node configurations by node configuration.
|
126
|
+
#
|
127
|
+
# @param resource_group_name [String] The resource group name.
|
128
|
+
# @param automation_account_name [String] The automation account name.
|
129
|
+
# @param node_configuration_name [String] The Dsc node configuration name.
|
130
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
131
|
+
# will be added to the HTTP request.
|
132
|
+
#
|
133
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
134
|
+
#
|
135
|
+
def get_with_http_info(resource_group_name, automation_account_name, node_configuration_name, custom_headers = nil)
|
136
|
+
get_async(resource_group_name, automation_account_name, node_configuration_name, custom_headers).value!
|
137
|
+
end
|
138
|
+
|
139
|
+
#
|
140
|
+
# Retrieve the Dsc node configurations by node configuration.
|
141
|
+
#
|
142
|
+
# @param resource_group_name [String] The resource group name.
|
143
|
+
# @param automation_account_name [String] The automation account name.
|
144
|
+
# @param node_configuration_name [String] The Dsc node configuration name.
|
145
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
146
|
+
# to the HTTP request.
|
147
|
+
#
|
148
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
149
|
+
#
|
150
|
+
def get_async(resource_group_name, automation_account_name, node_configuration_name, custom_headers = nil)
|
151
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
152
|
+
fail ArgumentError, 'automation_account_name is nil' if automation_account_name.nil?
|
153
|
+
fail ArgumentError, 'node_configuration_name is nil' if node_configuration_name.nil?
|
154
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
155
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
156
|
+
|
157
|
+
|
158
|
+
request_headers = {}
|
159
|
+
|
160
|
+
# Set Headers
|
161
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
162
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
163
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/nodeConfigurations/{nodeConfigurationName}'
|
164
|
+
|
165
|
+
request_url = @base_url || @client.base_url
|
166
|
+
|
167
|
+
options = {
|
168
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
169
|
+
path_params: {'resourceGroupName' => resource_group_name,'automationAccountName' => automation_account_name,'nodeConfigurationName' => node_configuration_name,'subscriptionId' => @client.subscription_id},
|
170
|
+
query_params: {'api-version' => @client.api_version},
|
171
|
+
headers: request_headers.merge(custom_headers || {}),
|
172
|
+
base_url: request_url
|
173
|
+
}
|
174
|
+
promise = @client.make_request_async(:get, path_template, options)
|
175
|
+
|
176
|
+
promise = promise.then do |result|
|
177
|
+
http_response = result.response
|
178
|
+
status_code = http_response.status
|
179
|
+
response_content = http_response.body
|
180
|
+
unless status_code == 200
|
181
|
+
error_model = JSON.load(response_content)
|
182
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
183
|
+
end
|
184
|
+
|
185
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
186
|
+
# Deserialize Response
|
187
|
+
if status_code == 200
|
188
|
+
begin
|
189
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
190
|
+
result_mapper = Azure::ARM::Automation::Models::DscNodeConfiguration.mapper()
|
191
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
192
|
+
rescue Exception => e
|
193
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
194
|
+
end
|
195
|
+
end
|
196
|
+
|
197
|
+
result
|
198
|
+
end
|
199
|
+
|
200
|
+
promise.execute
|
201
|
+
end
|
202
|
+
|
203
|
+
#
|
204
|
+
# Create the node configuration identified by node configuration name.
|
205
|
+
#
|
206
|
+
# @param resource_group_name [String] The resource group name.
|
207
|
+
# @param automation_account_name [String] The automation account name.
|
208
|
+
# @param node_configuration_name [String] The create or update parameters for
|
209
|
+
# configuration.
|
210
|
+
# @param parameters [DscNodeConfigurationCreateOrUpdateParameters] The create
|
211
|
+
# or update parameters for configuration.
|
212
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
213
|
+
# will be added to the HTTP request.
|
214
|
+
#
|
215
|
+
# @return [DscNodeConfiguration] operation results.
|
216
|
+
#
|
217
|
+
def create_or_update(resource_group_name, automation_account_name, node_configuration_name, parameters, custom_headers = nil)
|
218
|
+
response = create_or_update_async(resource_group_name, automation_account_name, node_configuration_name, parameters, custom_headers).value!
|
219
|
+
response.body unless response.nil?
|
220
|
+
end
|
221
|
+
|
222
|
+
#
|
223
|
+
# Create the node configuration identified by node configuration name.
|
224
|
+
#
|
225
|
+
# @param resource_group_name [String] The resource group name.
|
226
|
+
# @param automation_account_name [String] The automation account name.
|
227
|
+
# @param node_configuration_name [String] The create or update parameters for
|
228
|
+
# configuration.
|
229
|
+
# @param parameters [DscNodeConfigurationCreateOrUpdateParameters] The create
|
230
|
+
# or update parameters for configuration.
|
231
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
232
|
+
# will be added to the HTTP request.
|
233
|
+
#
|
234
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
235
|
+
#
|
236
|
+
def create_or_update_with_http_info(resource_group_name, automation_account_name, node_configuration_name, parameters, custom_headers = nil)
|
237
|
+
create_or_update_async(resource_group_name, automation_account_name, node_configuration_name, parameters, custom_headers).value!
|
238
|
+
end
|
239
|
+
|
240
|
+
#
|
241
|
+
# Create the node configuration identified by node configuration name.
|
242
|
+
#
|
243
|
+
# @param resource_group_name [String] The resource group name.
|
244
|
+
# @param automation_account_name [String] The automation account name.
|
245
|
+
# @param node_configuration_name [String] The create or update parameters for
|
246
|
+
# configuration.
|
247
|
+
# @param parameters [DscNodeConfigurationCreateOrUpdateParameters] The create
|
248
|
+
# or update parameters for configuration.
|
249
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
250
|
+
# to the HTTP request.
|
251
|
+
#
|
252
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
253
|
+
#
|
254
|
+
def create_or_update_async(resource_group_name, automation_account_name, node_configuration_name, parameters, custom_headers = nil)
|
255
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
256
|
+
fail ArgumentError, 'automation_account_name is nil' if automation_account_name.nil?
|
257
|
+
fail ArgumentError, 'node_configuration_name is nil' if node_configuration_name.nil?
|
258
|
+
fail ArgumentError, 'parameters is nil' if parameters.nil?
|
259
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
260
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
261
|
+
|
262
|
+
|
263
|
+
request_headers = {}
|
264
|
+
|
265
|
+
# Set Headers
|
266
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
267
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
268
|
+
|
269
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
270
|
+
|
271
|
+
# Serialize Request
|
272
|
+
request_mapper = Azure::ARM::Automation::Models::DscNodeConfigurationCreateOrUpdateParameters.mapper()
|
273
|
+
request_content = @client.serialize(request_mapper, parameters)
|
274
|
+
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
275
|
+
|
276
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/nodeConfigurations/{nodeConfigurationName}'
|
277
|
+
|
278
|
+
request_url = @base_url || @client.base_url
|
279
|
+
|
280
|
+
options = {
|
281
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
282
|
+
path_params: {'resourceGroupName' => resource_group_name,'automationAccountName' => automation_account_name,'nodeConfigurationName' => node_configuration_name,'subscriptionId' => @client.subscription_id},
|
283
|
+
query_params: {'api-version' => @client.api_version},
|
284
|
+
body: request_content,
|
285
|
+
headers: request_headers.merge(custom_headers || {}),
|
286
|
+
base_url: request_url
|
287
|
+
}
|
288
|
+
promise = @client.make_request_async(:put, path_template, options)
|
289
|
+
|
290
|
+
promise = promise.then do |result|
|
291
|
+
http_response = result.response
|
292
|
+
status_code = http_response.status
|
293
|
+
response_content = http_response.body
|
294
|
+
unless status_code == 200 || status_code == 201
|
295
|
+
error_model = JSON.load(response_content)
|
296
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
297
|
+
end
|
298
|
+
|
299
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
300
|
+
# Deserialize Response
|
301
|
+
if status_code == 200
|
302
|
+
begin
|
303
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
304
|
+
result_mapper = Azure::ARM::Automation::Models::DscNodeConfiguration.mapper()
|
305
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
306
|
+
rescue Exception => e
|
307
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
308
|
+
end
|
309
|
+
end
|
310
|
+
# Deserialize Response
|
311
|
+
if status_code == 201
|
312
|
+
begin
|
313
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
314
|
+
result_mapper = Azure::ARM::Automation::Models::DscNodeConfiguration.mapper()
|
315
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
316
|
+
rescue Exception => e
|
317
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
318
|
+
end
|
319
|
+
end
|
320
|
+
|
321
|
+
result
|
322
|
+
end
|
323
|
+
|
324
|
+
promise.execute
|
325
|
+
end
|
326
|
+
|
327
|
+
#
|
328
|
+
# Retrieve a list of dsc node configurations.
|
329
|
+
#
|
330
|
+
# @param resource_group_name [String] The resource group name.
|
331
|
+
# @param automation_account_name [String] The automation account name.
|
332
|
+
# @param filter [String] The filter to apply on the operation.
|
333
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
334
|
+
# will be added to the HTTP request.
|
335
|
+
#
|
336
|
+
# @return [Array<DscNodeConfiguration>] operation results.
|
337
|
+
#
|
338
|
+
def list_by_automation_account(resource_group_name, automation_account_name, filter = nil, custom_headers = nil)
|
339
|
+
first_page = list_by_automation_account_as_lazy(resource_group_name, automation_account_name, filter, custom_headers)
|
340
|
+
first_page.get_all_items
|
341
|
+
end
|
342
|
+
|
343
|
+
#
|
344
|
+
# Retrieve a list of dsc node configurations.
|
345
|
+
#
|
346
|
+
# @param resource_group_name [String] The resource group name.
|
347
|
+
# @param automation_account_name [String] The automation account name.
|
348
|
+
# @param filter [String] The filter to apply on the operation.
|
349
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
350
|
+
# will be added to the HTTP request.
|
351
|
+
#
|
352
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
353
|
+
#
|
354
|
+
def list_by_automation_account_with_http_info(resource_group_name, automation_account_name, filter = nil, custom_headers = nil)
|
355
|
+
list_by_automation_account_async(resource_group_name, automation_account_name, filter, custom_headers).value!
|
356
|
+
end
|
357
|
+
|
358
|
+
#
|
359
|
+
# Retrieve a list of dsc node configurations.
|
360
|
+
#
|
361
|
+
# @param resource_group_name [String] The resource group name.
|
362
|
+
# @param automation_account_name [String] The automation account name.
|
363
|
+
# @param filter [String] The filter to apply on the operation.
|
364
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
365
|
+
# to the HTTP request.
|
366
|
+
#
|
367
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
368
|
+
#
|
369
|
+
def list_by_automation_account_async(resource_group_name, automation_account_name, filter = nil, custom_headers = nil)
|
370
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
371
|
+
fail ArgumentError, 'automation_account_name is nil' if automation_account_name.nil?
|
372
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
373
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
374
|
+
|
375
|
+
|
376
|
+
request_headers = {}
|
377
|
+
|
378
|
+
# Set Headers
|
379
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
380
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
381
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/nodeConfigurations'
|
382
|
+
|
383
|
+
request_url = @base_url || @client.base_url
|
384
|
+
|
385
|
+
options = {
|
386
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
387
|
+
path_params: {'resourceGroupName' => resource_group_name,'automationAccountName' => automation_account_name,'subscriptionId' => @client.subscription_id},
|
388
|
+
query_params: {'$filter' => filter,'api-version' => @client.api_version},
|
389
|
+
headers: request_headers.merge(custom_headers || {}),
|
390
|
+
base_url: request_url
|
391
|
+
}
|
392
|
+
promise = @client.make_request_async(:get, path_template, options)
|
393
|
+
|
394
|
+
promise = promise.then do |result|
|
395
|
+
http_response = result.response
|
396
|
+
status_code = http_response.status
|
397
|
+
response_content = http_response.body
|
398
|
+
unless status_code == 200
|
399
|
+
error_model = JSON.load(response_content)
|
400
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
401
|
+
end
|
402
|
+
|
403
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
404
|
+
# Deserialize Response
|
405
|
+
if status_code == 200
|
406
|
+
begin
|
407
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
408
|
+
result_mapper = Azure::ARM::Automation::Models::DscNodeConfigurationListResult.mapper()
|
409
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
410
|
+
rescue Exception => e
|
411
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
412
|
+
end
|
413
|
+
end
|
414
|
+
|
415
|
+
result
|
416
|
+
end
|
417
|
+
|
418
|
+
promise.execute
|
419
|
+
end
|
420
|
+
|
421
|
+
#
|
422
|
+
# Retrieve a list of dsc node configurations.
|
423
|
+
#
|
424
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
425
|
+
# to List operation.
|
426
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
427
|
+
# will be added to the HTTP request.
|
428
|
+
#
|
429
|
+
# @return [DscNodeConfigurationListResult] operation results.
|
430
|
+
#
|
431
|
+
def list_by_automation_account_next(next_page_link, custom_headers = nil)
|
432
|
+
response = list_by_automation_account_next_async(next_page_link, custom_headers).value!
|
433
|
+
response.body unless response.nil?
|
434
|
+
end
|
435
|
+
|
436
|
+
#
|
437
|
+
# Retrieve a list of dsc node configurations.
|
438
|
+
#
|
439
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
440
|
+
# to List operation.
|
441
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
442
|
+
# will be added to the HTTP request.
|
443
|
+
#
|
444
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
445
|
+
#
|
446
|
+
def list_by_automation_account_next_with_http_info(next_page_link, custom_headers = nil)
|
447
|
+
list_by_automation_account_next_async(next_page_link, custom_headers).value!
|
448
|
+
end
|
449
|
+
|
450
|
+
#
|
451
|
+
# Retrieve a list of dsc node configurations.
|
452
|
+
#
|
453
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
454
|
+
# to List operation.
|
455
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
456
|
+
# to the HTTP request.
|
457
|
+
#
|
458
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
459
|
+
#
|
460
|
+
def list_by_automation_account_next_async(next_page_link, custom_headers = nil)
|
461
|
+
fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
|
462
|
+
|
463
|
+
|
464
|
+
request_headers = {}
|
465
|
+
|
466
|
+
# Set Headers
|
467
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
468
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
469
|
+
path_template = '{nextLink}'
|
470
|
+
|
471
|
+
request_url = @base_url || @client.base_url
|
472
|
+
|
473
|
+
options = {
|
474
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
475
|
+
skip_encoding_path_params: {'nextLink' => next_page_link},
|
476
|
+
headers: request_headers.merge(custom_headers || {}),
|
477
|
+
base_url: request_url
|
478
|
+
}
|
479
|
+
promise = @client.make_request_async(:get, path_template, options)
|
480
|
+
|
481
|
+
promise = promise.then do |result|
|
482
|
+
http_response = result.response
|
483
|
+
status_code = http_response.status
|
484
|
+
response_content = http_response.body
|
485
|
+
unless status_code == 200
|
486
|
+
error_model = JSON.load(response_content)
|
487
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
488
|
+
end
|
489
|
+
|
490
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
491
|
+
# Deserialize Response
|
492
|
+
if status_code == 200
|
493
|
+
begin
|
494
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
495
|
+
result_mapper = Azure::ARM::Automation::Models::DscNodeConfigurationListResult.mapper()
|
496
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
497
|
+
rescue Exception => e
|
498
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
499
|
+
end
|
500
|
+
end
|
501
|
+
|
502
|
+
result
|
503
|
+
end
|
504
|
+
|
505
|
+
promise.execute
|
506
|
+
end
|
507
|
+
|
508
|
+
#
|
509
|
+
# Retrieve a list of dsc node configurations.
|
510
|
+
#
|
511
|
+
# @param resource_group_name [String] The resource group name.
|
512
|
+
# @param automation_account_name [String] The automation account name.
|
513
|
+
# @param filter [String] The filter to apply on the operation.
|
514
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
515
|
+
# will be added to the HTTP request.
|
516
|
+
#
|
517
|
+
# @return [DscNodeConfigurationListResult] which provide lazy access to pages
|
518
|
+
# of the response.
|
519
|
+
#
|
520
|
+
def list_by_automation_account_as_lazy(resource_group_name, automation_account_name, filter = nil, custom_headers = nil)
|
521
|
+
response = list_by_automation_account_async(resource_group_name, automation_account_name, filter, custom_headers).value!
|
522
|
+
unless response.nil?
|
523
|
+
page = response.body
|
524
|
+
page.next_method = Proc.new do |next_page_link|
|
525
|
+
list_by_automation_account_next_async(next_page_link, custom_headers)
|
526
|
+
end
|
527
|
+
page
|
528
|
+
end
|
529
|
+
end
|
530
|
+
|
531
|
+
end
|
532
|
+
end
|