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,333 @@
|
|
|
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 JobStreamOperations
|
|
11
|
+
include MsRestAzure
|
|
12
|
+
|
|
13
|
+
#
|
|
14
|
+
# Creates and initializes a new instance of the JobStreamOperations 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 the job stream identified by job stream id.
|
|
26
|
+
#
|
|
27
|
+
# @param resource_group_name [String] The resource group name.
|
|
28
|
+
# @param automation_account_name [String] The automation account name.
|
|
29
|
+
# @param job_id [String] The job id.
|
|
30
|
+
# @param job_stream_id [String] The job stream id.
|
|
31
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
|
32
|
+
# will be added to the HTTP request.
|
|
33
|
+
#
|
|
34
|
+
# @return [JobStream] operation results.
|
|
35
|
+
#
|
|
36
|
+
def get(resource_group_name, automation_account_name, job_id, job_stream_id, custom_headers = nil)
|
|
37
|
+
response = get_async(resource_group_name, automation_account_name, job_id, job_stream_id, custom_headers).value!
|
|
38
|
+
response.body unless response.nil?
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
#
|
|
42
|
+
# Retrieve the job stream identified by job stream id.
|
|
43
|
+
#
|
|
44
|
+
# @param resource_group_name [String] The resource group name.
|
|
45
|
+
# @param automation_account_name [String] The automation account name.
|
|
46
|
+
# @param job_id [String] The job id.
|
|
47
|
+
# @param job_stream_id [String] The job stream id.
|
|
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 get_with_http_info(resource_group_name, automation_account_name, job_id, job_stream_id, custom_headers = nil)
|
|
54
|
+
get_async(resource_group_name, automation_account_name, job_id, job_stream_id, custom_headers).value!
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
#
|
|
58
|
+
# Retrieve the job stream identified by job stream id.
|
|
59
|
+
#
|
|
60
|
+
# @param resource_group_name [String] The resource group name.
|
|
61
|
+
# @param automation_account_name [String] The automation account name.
|
|
62
|
+
# @param job_id [String] The job id.
|
|
63
|
+
# @param job_stream_id [String] The job stream id.
|
|
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 get_async(resource_group_name, automation_account_name, job_id, job_stream_id, 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, 'job_id is nil' if job_id.nil?
|
|
73
|
+
fail ArgumentError, 'job_stream_id is nil' if job_stream_id.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}/jobs/{jobId}/streams/{jobStreamId}'
|
|
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,'jobId' => job_id,'jobStreamId' => job_stream_id,'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::JobStream.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
|
+
#
|
|
124
|
+
# Retrieve a list of jobs streams identified by job id.
|
|
125
|
+
#
|
|
126
|
+
# @param resource_group_name [String] The resource group name.
|
|
127
|
+
# @param automation_account_name [String] The automation account name.
|
|
128
|
+
# @param job_id [String] The job Id.
|
|
129
|
+
# @param filter [String] The filter to apply on the operation.
|
|
130
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
|
131
|
+
# will be added to the HTTP request.
|
|
132
|
+
#
|
|
133
|
+
# @return [Array<JobStream>] operation results.
|
|
134
|
+
#
|
|
135
|
+
def list_by_job(resource_group_name, automation_account_name, job_id, filter = nil, custom_headers = nil)
|
|
136
|
+
first_page = list_by_job_as_lazy(resource_group_name, automation_account_name, job_id, filter, custom_headers)
|
|
137
|
+
first_page.get_all_items
|
|
138
|
+
end
|
|
139
|
+
|
|
140
|
+
#
|
|
141
|
+
# Retrieve a list of jobs streams identified by job id.
|
|
142
|
+
#
|
|
143
|
+
# @param resource_group_name [String] The resource group name.
|
|
144
|
+
# @param automation_account_name [String] The automation account name.
|
|
145
|
+
# @param job_id [String] The job Id.
|
|
146
|
+
# @param filter [String] The filter to apply on the operation.
|
|
147
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
|
148
|
+
# will be added to the HTTP request.
|
|
149
|
+
#
|
|
150
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
|
151
|
+
#
|
|
152
|
+
def list_by_job_with_http_info(resource_group_name, automation_account_name, job_id, filter = nil, custom_headers = nil)
|
|
153
|
+
list_by_job_async(resource_group_name, automation_account_name, job_id, filter, custom_headers).value!
|
|
154
|
+
end
|
|
155
|
+
|
|
156
|
+
#
|
|
157
|
+
# Retrieve a list of jobs streams identified by job id.
|
|
158
|
+
#
|
|
159
|
+
# @param resource_group_name [String] The resource group name.
|
|
160
|
+
# @param automation_account_name [String] The automation account name.
|
|
161
|
+
# @param job_id [String] The job Id.
|
|
162
|
+
# @param filter [String] The filter to apply on the operation.
|
|
163
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
|
164
|
+
# to the HTTP request.
|
|
165
|
+
#
|
|
166
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
|
167
|
+
#
|
|
168
|
+
def list_by_job_async(resource_group_name, automation_account_name, job_id, filter = nil, custom_headers = nil)
|
|
169
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
|
170
|
+
fail ArgumentError, 'automation_account_name is nil' if automation_account_name.nil?
|
|
171
|
+
fail ArgumentError, 'job_id is nil' if job_id.nil?
|
|
172
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
|
173
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
|
174
|
+
|
|
175
|
+
|
|
176
|
+
request_headers = {}
|
|
177
|
+
|
|
178
|
+
# Set Headers
|
|
179
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
|
180
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
|
181
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/jobs/{jobId}/streams'
|
|
182
|
+
|
|
183
|
+
request_url = @base_url || @client.base_url
|
|
184
|
+
|
|
185
|
+
options = {
|
|
186
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
|
187
|
+
path_params: {'resourceGroupName' => resource_group_name,'automationAccountName' => automation_account_name,'jobId' => job_id,'subscriptionId' => @client.subscription_id},
|
|
188
|
+
query_params: {'$filter' => filter,'api-version' => @client.api_version},
|
|
189
|
+
headers: request_headers.merge(custom_headers || {}),
|
|
190
|
+
base_url: request_url
|
|
191
|
+
}
|
|
192
|
+
promise = @client.make_request_async(:get, path_template, options)
|
|
193
|
+
|
|
194
|
+
promise = promise.then do |result|
|
|
195
|
+
http_response = result.response
|
|
196
|
+
status_code = http_response.status
|
|
197
|
+
response_content = http_response.body
|
|
198
|
+
unless status_code == 200
|
|
199
|
+
error_model = JSON.load(response_content)
|
|
200
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
|
201
|
+
end
|
|
202
|
+
|
|
203
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
|
204
|
+
# Deserialize Response
|
|
205
|
+
if status_code == 200
|
|
206
|
+
begin
|
|
207
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
|
208
|
+
result_mapper = Azure::ARM::Automation::Models::JobStreamListResult.mapper()
|
|
209
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
|
210
|
+
rescue Exception => e
|
|
211
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
|
212
|
+
end
|
|
213
|
+
end
|
|
214
|
+
|
|
215
|
+
result
|
|
216
|
+
end
|
|
217
|
+
|
|
218
|
+
promise.execute
|
|
219
|
+
end
|
|
220
|
+
|
|
221
|
+
#
|
|
222
|
+
# Retrieve a list of jobs streams identified by job id.
|
|
223
|
+
#
|
|
224
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
|
225
|
+
# to List operation.
|
|
226
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
|
227
|
+
# will be added to the HTTP request.
|
|
228
|
+
#
|
|
229
|
+
# @return [JobStreamListResult] operation results.
|
|
230
|
+
#
|
|
231
|
+
def list_by_job_next(next_page_link, custom_headers = nil)
|
|
232
|
+
response = list_by_job_next_async(next_page_link, custom_headers).value!
|
|
233
|
+
response.body unless response.nil?
|
|
234
|
+
end
|
|
235
|
+
|
|
236
|
+
#
|
|
237
|
+
# Retrieve a list of jobs streams identified by job id.
|
|
238
|
+
#
|
|
239
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
|
240
|
+
# to List operation.
|
|
241
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
|
242
|
+
# will be added to the HTTP request.
|
|
243
|
+
#
|
|
244
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
|
245
|
+
#
|
|
246
|
+
def list_by_job_next_with_http_info(next_page_link, custom_headers = nil)
|
|
247
|
+
list_by_job_next_async(next_page_link, custom_headers).value!
|
|
248
|
+
end
|
|
249
|
+
|
|
250
|
+
#
|
|
251
|
+
# Retrieve a list of jobs streams identified by job id.
|
|
252
|
+
#
|
|
253
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
|
254
|
+
# to List operation.
|
|
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 list_by_job_next_async(next_page_link, custom_headers = nil)
|
|
261
|
+
fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
|
|
262
|
+
|
|
263
|
+
|
|
264
|
+
request_headers = {}
|
|
265
|
+
|
|
266
|
+
# Set Headers
|
|
267
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
|
268
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
|
269
|
+
path_template = '{nextLink}'
|
|
270
|
+
|
|
271
|
+
request_url = @base_url || @client.base_url
|
|
272
|
+
|
|
273
|
+
options = {
|
|
274
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
|
275
|
+
skip_encoding_path_params: {'nextLink' => next_page_link},
|
|
276
|
+
headers: request_headers.merge(custom_headers || {}),
|
|
277
|
+
base_url: request_url
|
|
278
|
+
}
|
|
279
|
+
promise = @client.make_request_async(:get, path_template, options)
|
|
280
|
+
|
|
281
|
+
promise = promise.then do |result|
|
|
282
|
+
http_response = result.response
|
|
283
|
+
status_code = http_response.status
|
|
284
|
+
response_content = http_response.body
|
|
285
|
+
unless status_code == 200
|
|
286
|
+
error_model = JSON.load(response_content)
|
|
287
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
|
288
|
+
end
|
|
289
|
+
|
|
290
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
|
291
|
+
# Deserialize Response
|
|
292
|
+
if status_code == 200
|
|
293
|
+
begin
|
|
294
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
|
295
|
+
result_mapper = Azure::ARM::Automation::Models::JobStreamListResult.mapper()
|
|
296
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
|
297
|
+
rescue Exception => e
|
|
298
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
|
299
|
+
end
|
|
300
|
+
end
|
|
301
|
+
|
|
302
|
+
result
|
|
303
|
+
end
|
|
304
|
+
|
|
305
|
+
promise.execute
|
|
306
|
+
end
|
|
307
|
+
|
|
308
|
+
#
|
|
309
|
+
# Retrieve a list of jobs streams identified by job id.
|
|
310
|
+
#
|
|
311
|
+
# @param resource_group_name [String] The resource group name.
|
|
312
|
+
# @param automation_account_name [String] The automation account name.
|
|
313
|
+
# @param job_id [String] The job Id.
|
|
314
|
+
# @param filter [String] The filter to apply on the operation.
|
|
315
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
|
316
|
+
# will be added to the HTTP request.
|
|
317
|
+
#
|
|
318
|
+
# @return [JobStreamListResult] which provide lazy access to pages of the
|
|
319
|
+
# response.
|
|
320
|
+
#
|
|
321
|
+
def list_by_job_as_lazy(resource_group_name, automation_account_name, job_id, filter = nil, custom_headers = nil)
|
|
322
|
+
response = list_by_job_async(resource_group_name, automation_account_name, job_id, filter, custom_headers).value!
|
|
323
|
+
unless response.nil?
|
|
324
|
+
page = response.body
|
|
325
|
+
page.next_method = Proc.new do |next_page_link|
|
|
326
|
+
list_by_job_next_async(next_page_link, custom_headers)
|
|
327
|
+
end
|
|
328
|
+
page
|
|
329
|
+
end
|
|
330
|
+
end
|
|
331
|
+
|
|
332
|
+
end
|
|
333
|
+
end
|
|
@@ -0,0 +1,133 @@
|
|
|
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
|
+
module Models
|
|
8
|
+
#
|
|
9
|
+
# Definition of the activity.
|
|
10
|
+
#
|
|
11
|
+
class Activity
|
|
12
|
+
|
|
13
|
+
include MsRestAzure
|
|
14
|
+
|
|
15
|
+
# @return [String] Gets or sets the id of the resource.
|
|
16
|
+
attr_accessor :id
|
|
17
|
+
|
|
18
|
+
# @return [String] Gets the name of the activity.
|
|
19
|
+
attr_accessor :name
|
|
20
|
+
|
|
21
|
+
# @return [String] Gets or sets the user name of the activity.
|
|
22
|
+
attr_accessor :definition
|
|
23
|
+
|
|
24
|
+
# @return [Array<ActivityParameterSet>] Gets or sets the parameter sets
|
|
25
|
+
# of the activity.
|
|
26
|
+
attr_accessor :parameter_sets
|
|
27
|
+
|
|
28
|
+
# @return [Array<ActivityOutputType>] Gets or sets the output types of
|
|
29
|
+
# the activity.
|
|
30
|
+
attr_accessor :output_types
|
|
31
|
+
|
|
32
|
+
# @return [DateTime] Gets or sets the creation time.
|
|
33
|
+
attr_accessor :creation_time
|
|
34
|
+
|
|
35
|
+
# @return [DateTime] Gets or sets the last modified time.
|
|
36
|
+
attr_accessor :last_modified_time
|
|
37
|
+
|
|
38
|
+
# @return [String] Gets or sets the description.
|
|
39
|
+
attr_accessor :description
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
#
|
|
43
|
+
# Mapper for Activity class as Ruby Hash.
|
|
44
|
+
# This will be used for serialization/deserialization.
|
|
45
|
+
#
|
|
46
|
+
def self.mapper()
|
|
47
|
+
{
|
|
48
|
+
required: false,
|
|
49
|
+
serialized_name: 'Activity',
|
|
50
|
+
type: {
|
|
51
|
+
name: 'Composite',
|
|
52
|
+
class_name: 'Activity',
|
|
53
|
+
model_properties: {
|
|
54
|
+
id: {
|
|
55
|
+
required: false,
|
|
56
|
+
serialized_name: 'id',
|
|
57
|
+
type: {
|
|
58
|
+
name: 'String'
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
name: {
|
|
62
|
+
required: false,
|
|
63
|
+
read_only: true,
|
|
64
|
+
serialized_name: 'name',
|
|
65
|
+
type: {
|
|
66
|
+
name: 'String'
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
definition: {
|
|
70
|
+
required: false,
|
|
71
|
+
serialized_name: 'properties.definition',
|
|
72
|
+
type: {
|
|
73
|
+
name: 'String'
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
parameter_sets: {
|
|
77
|
+
required: false,
|
|
78
|
+
serialized_name: 'properties.parameterSets',
|
|
79
|
+
type: {
|
|
80
|
+
name: 'Sequence',
|
|
81
|
+
element: {
|
|
82
|
+
required: false,
|
|
83
|
+
serialized_name: 'ActivityParameterSetElementType',
|
|
84
|
+
type: {
|
|
85
|
+
name: 'Composite',
|
|
86
|
+
class_name: 'ActivityParameterSet'
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
output_types: {
|
|
92
|
+
required: false,
|
|
93
|
+
serialized_name: 'properties.outputTypes',
|
|
94
|
+
type: {
|
|
95
|
+
name: 'Sequence',
|
|
96
|
+
element: {
|
|
97
|
+
required: false,
|
|
98
|
+
serialized_name: 'ActivityOutputTypeElementType',
|
|
99
|
+
type: {
|
|
100
|
+
name: 'Composite',
|
|
101
|
+
class_name: 'ActivityOutputType'
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
creation_time: {
|
|
107
|
+
required: false,
|
|
108
|
+
serialized_name: 'properties.creationTime',
|
|
109
|
+
type: {
|
|
110
|
+
name: 'DateTime'
|
|
111
|
+
}
|
|
112
|
+
},
|
|
113
|
+
last_modified_time: {
|
|
114
|
+
required: false,
|
|
115
|
+
serialized_name: 'properties.lastModifiedTime',
|
|
116
|
+
type: {
|
|
117
|
+
name: 'DateTime'
|
|
118
|
+
}
|
|
119
|
+
},
|
|
120
|
+
description: {
|
|
121
|
+
required: false,
|
|
122
|
+
serialized_name: 'properties.description',
|
|
123
|
+
type: {
|
|
124
|
+
name: 'String'
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
end
|
|
131
|
+
end
|
|
132
|
+
end
|
|
133
|
+
end
|