azure_mgmt_automation 0.16.0 → 0.17.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/2015-10-31/generated/azure_mgmt_automation.rb +110 -97
- data/lib/2015-10-31/generated/azure_mgmt_automation/activity_operations.rb +36 -25
- data/lib/2015-10-31/generated/azure_mgmt_automation/agent_registration_information.rb +32 -22
- data/lib/2015-10-31/generated/azure_mgmt_automation/automation_account_operations.rb +38 -31
- data/lib/2015-10-31/generated/azure_mgmt_automation/automation_client.rb +22 -12
- data/lib/2015-10-31/generated/azure_mgmt_automation/certificate_operations.rb +84 -58
- data/lib/2015-10-31/generated/azure_mgmt_automation/connection_operations.rb +84 -58
- data/lib/2015-10-31/generated/azure_mgmt_automation/connection_type_operations.rb +68 -47
- data/lib/2015-10-31/generated/azure_mgmt_automation/credential_operations.rb +84 -58
- data/lib/2015-10-31/generated/azure_mgmt_automation/dsc_compilation_job_operations.rb +68 -47
- data/lib/2015-10-31/generated/azure_mgmt_automation/dsc_compilation_job_stream.rb +124 -0
- data/lib/2015-10-31/generated/azure_mgmt_automation/dsc_configuration_operations.rb +218 -61
- data/lib/2015-10-31/generated/azure_mgmt_automation/dsc_node_configuration_operations.rb +69 -58
- data/lib/2015-10-31/generated/azure_mgmt_automation/dsc_node_operations.rb +68 -47
- data/lib/2015-10-31/generated/azure_mgmt_automation/fields.rb +16 -11
- data/lib/2015-10-31/generated/azure_mgmt_automation/hybrid_runbook_worker_group_operations.rb +73 -48
- data/lib/2015-10-31/generated/azure_mgmt_automation/job_operations.rb +132 -91
- data/lib/2015-10-31/generated/azure_mgmt_automation/job_schedule_operations.rb +73 -48
- data/lib/2015-10-31/generated/azure_mgmt_automation/job_stream_operations.rb +36 -25
- data/lib/2015-10-31/generated/azure_mgmt_automation/keys.rb +120 -0
- data/lib/2015-10-31/generated/azure_mgmt_automation/linked_workspace_operations.rb +120 -0
- data/lib/2015-10-31/generated/azure_mgmt_automation/models/activity_parameter.rb +35 -2
- data/lib/2015-10-31/generated/azure_mgmt_automation/models/activity_parameter_validation_set.rb +47 -0
- data/lib/2015-10-31/generated/azure_mgmt_automation/models/advanced_schedule_monthly_occurrence.rb +1 -1
- data/lib/2015-10-31/generated/azure_mgmt_automation/models/agent_registration_key_name.rb +2 -2
- data/lib/2015-10-31/generated/azure_mgmt_automation/models/agent_registration_regenerate_key_parameter.rb +2 -2
- data/lib/2015-10-31/generated/azure_mgmt_automation/models/automation_account.rb +9 -9
- data/lib/2015-10-31/generated/azure_mgmt_automation/models/automation_key_name.rb +16 -0
- data/lib/2015-10-31/generated/azure_mgmt_automation/models/automation_key_permissions.rb +16 -0
- data/lib/2015-10-31/generated/azure_mgmt_automation/models/certificate.rb +1 -10
- data/lib/2015-10-31/generated/azure_mgmt_automation/models/connection.rb +1 -10
- data/lib/2015-10-31/generated/azure_mgmt_automation/models/credential.rb +1 -10
- data/lib/2015-10-31/generated/azure_mgmt_automation/models/dsc_compilation_job.rb +44 -4
- data/lib/2015-10-31/generated/azure_mgmt_automation/models/dsc_compilation_job_create_parameters.rb +3 -3
- data/lib/2015-10-31/generated/azure_mgmt_automation/models/dsc_configuration.rb +20 -9
- data/lib/2015-10-31/generated/azure_mgmt_automation/models/dsc_configuration_list_result.rb +12 -0
- data/lib/2015-10-31/generated/azure_mgmt_automation/models/dsc_configuration_update_parameters.rb +132 -0
- data/lib/2015-10-31/generated/azure_mgmt_automation/models/dsc_node.rb +1 -25
- data/lib/2015-10-31/generated/azure_mgmt_automation/models/dsc_node_configuration.rb +20 -15
- data/lib/2015-10-31/generated/azure_mgmt_automation/models/dsc_node_configuration_create_or_update_parameters.rb +4 -4
- data/lib/2015-10-31/generated/azure_mgmt_automation/models/group_type_enum.rb +16 -0
- data/lib/2015-10-31/generated/azure_mgmt_automation/models/hybrid_runbook_worker.rb +11 -0
- data/lib/2015-10-31/generated/azure_mgmt_automation/models/hybrid_runbook_worker_group.rb +12 -0
- data/lib/2015-10-31/generated/azure_mgmt_automation/models/job.rb +37 -1
- data/lib/2015-10-31/generated/azure_mgmt_automation/models/job_create_parameters.rb +0 -42
- data/lib/2015-10-31/generated/azure_mgmt_automation/models/job_provisioning_state.rb +18 -0
- data/lib/2015-10-31/generated/azure_mgmt_automation/models/key.rb +73 -0
- data/lib/2015-10-31/generated/azure_mgmt_automation/models/key_list_result.rb +56 -0
- data/lib/2015-10-31/generated/azure_mgmt_automation/models/{sub_resource.rb → linked_workspace.rb} +7 -6
- data/lib/2015-10-31/generated/azure_mgmt_automation/models/module_model.rb +20 -9
- data/lib/2015-10-31/generated/azure_mgmt_automation/models/proxy_resource.rb +62 -0
- data/lib/2015-10-31/generated/azure_mgmt_automation/models/resource.rb +4 -34
- data/lib/2015-10-31/generated/azure_mgmt_automation/models/runbook.rb +9 -9
- data/lib/2015-10-31/generated/azure_mgmt_automation/models/runbook_draft.rb +2 -1
- data/lib/2015-10-31/generated/azure_mgmt_automation/models/schedule.rb +1 -10
- data/lib/2015-10-31/generated/azure_mgmt_automation/models/schedule_association_property.rb +1 -1
- data/lib/2015-10-31/generated/azure_mgmt_automation/models/schedule_create_or_update_parameters.rb +1 -1
- data/lib/2015-10-31/generated/azure_mgmt_automation/models/schedule_update_parameters.rb +1 -1
- data/lib/2015-10-31/generated/azure_mgmt_automation/models/test_job.rb +11 -0
- data/lib/2015-10-31/generated/azure_mgmt_automation/models/test_job_create_parameters.rb +0 -11
- data/lib/2015-10-31/generated/azure_mgmt_automation/models/tracked_resource.rb +92 -0
- data/lib/2015-10-31/generated/azure_mgmt_automation/models/variable.rb +1 -10
- data/lib/2015-10-31/generated/azure_mgmt_automation/models/webhook.rb +23 -7
- data/lib/2015-10-31/generated/azure_mgmt_automation/models/webhook_update_parameters.rb +1 -1
- data/lib/2015-10-31/generated/azure_mgmt_automation/module_model_operations.rb +84 -58
- data/lib/2015-10-31/generated/azure_mgmt_automation/node_reports.rb +53 -54
- data/lib/2015-10-31/generated/azure_mgmt_automation/object_data_types.rb +32 -22
- data/lib/2015-10-31/generated/azure_mgmt_automation/runbook_draft_operations.rb +150 -107
- data/lib/2015-10-31/generated/azure_mgmt_automation/runbook_operations.rb +130 -78
- data/lib/2015-10-31/generated/azure_mgmt_automation/schedule_operations.rb +96 -60
- data/lib/2015-10-31/generated/azure_mgmt_automation/statistics_operations.rb +8 -6
- data/lib/2015-10-31/generated/azure_mgmt_automation/{test_jobs.rb → test_job_operations.rb} +87 -62
- data/lib/2015-10-31/generated/azure_mgmt_automation/test_job_streams.rb +44 -30
- data/lib/2015-10-31/generated/azure_mgmt_automation/usages.rb +8 -6
- data/lib/2015-10-31/generated/azure_mgmt_automation/variable_operations.rb +84 -58
- data/lib/2015-10-31/generated/azure_mgmt_automation/webhook_operations.rb +100 -69
- data/lib/profiles/latest/modules/automation_profile_module.rb +364 -318
- data/lib/version.rb +1 -1
- metadata +19 -6
@@ -24,7 +24,8 @@ module Azure::Automation::Mgmt::V2015_10_31
|
|
24
24
|
#
|
25
25
|
# Retrieve a list of fields of a given type identified by module name.
|
26
26
|
#
|
27
|
-
# @param
|
27
|
+
# @param resource_group_name [String] Name of an Azure Resource group.
|
28
|
+
# @param automation_account_name [String] The name of the automation account.
|
28
29
|
# @param module_name [String] The name of module.
|
29
30
|
# @param type_name [String] The name of type.
|
30
31
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
@@ -32,15 +33,16 @@ module Azure::Automation::Mgmt::V2015_10_31
|
|
32
33
|
#
|
33
34
|
# @return [TypeFieldListResult] operation results.
|
34
35
|
#
|
35
|
-
def list_fields_by_module_and_type(automation_account_name, module_name, type_name, custom_headers:nil)
|
36
|
-
response = list_fields_by_module_and_type_async(automation_account_name, module_name, type_name, custom_headers:custom_headers).value!
|
36
|
+
def list_fields_by_module_and_type(resource_group_name, automation_account_name, module_name, type_name, custom_headers:nil)
|
37
|
+
response = list_fields_by_module_and_type_async(resource_group_name, automation_account_name, module_name, type_name, custom_headers:custom_headers).value!
|
37
38
|
response.body unless response.nil?
|
38
39
|
end
|
39
40
|
|
40
41
|
#
|
41
42
|
# Retrieve a list of fields of a given type identified by module name.
|
42
43
|
#
|
43
|
-
# @param
|
44
|
+
# @param resource_group_name [String] Name of an Azure Resource group.
|
45
|
+
# @param automation_account_name [String] The name of the automation account.
|
44
46
|
# @param module_name [String] The name of module.
|
45
47
|
# @param type_name [String] The name of type.
|
46
48
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
@@ -48,14 +50,15 @@ module Azure::Automation::Mgmt::V2015_10_31
|
|
48
50
|
#
|
49
51
|
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
50
52
|
#
|
51
|
-
def list_fields_by_module_and_type_with_http_info(automation_account_name, module_name, type_name, custom_headers:nil)
|
52
|
-
list_fields_by_module_and_type_async(automation_account_name, module_name, type_name, custom_headers:custom_headers).value!
|
53
|
+
def list_fields_by_module_and_type_with_http_info(resource_group_name, automation_account_name, module_name, type_name, custom_headers:nil)
|
54
|
+
list_fields_by_module_and_type_async(resource_group_name, automation_account_name, module_name, type_name, custom_headers:custom_headers).value!
|
53
55
|
end
|
54
56
|
|
55
57
|
#
|
56
58
|
# Retrieve a list of fields of a given type identified by module name.
|
57
59
|
#
|
58
|
-
# @param
|
60
|
+
# @param resource_group_name [String] Name of an Azure Resource group.
|
61
|
+
# @param automation_account_name [String] The name of the automation account.
|
59
62
|
# @param module_name [String] The name of module.
|
60
63
|
# @param type_name [String] The name of type.
|
61
64
|
# @param [Hash{String => String}] A hash of custom headers that will be added
|
@@ -63,9 +66,11 @@ module Azure::Automation::Mgmt::V2015_10_31
|
|
63
66
|
#
|
64
67
|
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
65
68
|
#
|
66
|
-
def list_fields_by_module_and_type_async(automation_account_name, module_name, type_name, custom_headers:nil)
|
67
|
-
fail ArgumentError, '
|
68
|
-
fail ArgumentError, "'
|
69
|
+
def list_fields_by_module_and_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, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
|
72
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
|
73
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._]+$$')).nil?
|
69
74
|
fail ArgumentError, 'automation_account_name is nil' if automation_account_name.nil?
|
70
75
|
fail ArgumentError, 'module_name is nil' if module_name.nil?
|
71
76
|
fail ArgumentError, 'type_name is nil' if type_name.nil?
|
@@ -85,7 +90,7 @@ module Azure::Automation::Mgmt::V2015_10_31
|
|
85
90
|
|
86
91
|
options = {
|
87
92
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
88
|
-
path_params: {'resourceGroupName' =>
|
93
|
+
path_params: {'resourceGroupName' => resource_group_name,'automationAccountName' => automation_account_name,'moduleName' => module_name,'typeName' => type_name,'subscriptionId' => @client.subscription_id},
|
89
94
|
query_params: {'api-version' => @client.api_version},
|
90
95
|
headers: request_headers.merge(custom_headers || {}),
|
91
96
|
base_url: request_url
|
@@ -122,45 +127,50 @@ module Azure::Automation::Mgmt::V2015_10_31
|
|
122
127
|
#
|
123
128
|
# Retrieve a list of fields of a given type across all accessible modules.
|
124
129
|
#
|
125
|
-
# @param
|
130
|
+
# @param resource_group_name [String] Name of an Azure Resource group.
|
131
|
+
# @param automation_account_name [String] The name of the automation account.
|
126
132
|
# @param type_name [String] The name of type.
|
127
133
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
128
134
|
# will be added to the HTTP request.
|
129
135
|
#
|
130
136
|
# @return [TypeFieldListResult] operation results.
|
131
137
|
#
|
132
|
-
def list_fields_by_type(automation_account_name, type_name, custom_headers:nil)
|
133
|
-
response = list_fields_by_type_async(automation_account_name, type_name, custom_headers:custom_headers).value!
|
138
|
+
def list_fields_by_type(resource_group_name, automation_account_name, type_name, custom_headers:nil)
|
139
|
+
response = list_fields_by_type_async(resource_group_name, automation_account_name, type_name, custom_headers:custom_headers).value!
|
134
140
|
response.body unless response.nil?
|
135
141
|
end
|
136
142
|
|
137
143
|
#
|
138
144
|
# Retrieve a list of fields of a given type across all accessible modules.
|
139
145
|
#
|
140
|
-
# @param
|
146
|
+
# @param resource_group_name [String] Name of an Azure Resource group.
|
147
|
+
# @param automation_account_name [String] The name of the automation account.
|
141
148
|
# @param type_name [String] The name of type.
|
142
149
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
143
150
|
# will be added to the HTTP request.
|
144
151
|
#
|
145
152
|
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
146
153
|
#
|
147
|
-
def list_fields_by_type_with_http_info(automation_account_name, type_name, custom_headers:nil)
|
148
|
-
list_fields_by_type_async(automation_account_name, type_name, custom_headers:custom_headers).value!
|
154
|
+
def list_fields_by_type_with_http_info(resource_group_name, automation_account_name, type_name, custom_headers:nil)
|
155
|
+
list_fields_by_type_async(resource_group_name, automation_account_name, type_name, custom_headers:custom_headers).value!
|
149
156
|
end
|
150
157
|
|
151
158
|
#
|
152
159
|
# Retrieve a list of fields of a given type across all accessible modules.
|
153
160
|
#
|
154
|
-
# @param
|
161
|
+
# @param resource_group_name [String] Name of an Azure Resource group.
|
162
|
+
# @param automation_account_name [String] The name of the automation account.
|
155
163
|
# @param type_name [String] The name of type.
|
156
164
|
# @param [Hash{String => String}] A hash of custom headers that will be added
|
157
165
|
# to the HTTP request.
|
158
166
|
#
|
159
167
|
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
160
168
|
#
|
161
|
-
def list_fields_by_type_async(automation_account_name, type_name, custom_headers:nil)
|
162
|
-
fail ArgumentError, '
|
163
|
-
fail ArgumentError, "'
|
169
|
+
def list_fields_by_type_async(resource_group_name, automation_account_name, type_name, custom_headers:nil)
|
170
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
171
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
|
172
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
|
173
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._]+$$')).nil?
|
164
174
|
fail ArgumentError, 'automation_account_name is nil' if automation_account_name.nil?
|
165
175
|
fail ArgumentError, 'type_name is nil' if type_name.nil?
|
166
176
|
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
@@ -179,7 +189,7 @@ module Azure::Automation::Mgmt::V2015_10_31
|
|
179
189
|
|
180
190
|
options = {
|
181
191
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
182
|
-
path_params: {'resourceGroupName' =>
|
192
|
+
path_params: {'resourceGroupName' => resource_group_name,'automationAccountName' => automation_account_name,'typeName' => type_name,'subscriptionId' => @client.subscription_id},
|
183
193
|
query_params: {'api-version' => @client.api_version},
|
184
194
|
headers: request_headers.merge(custom_headers || {}),
|
185
195
|
base_url: request_url
|
@@ -24,48 +24,53 @@ module Azure::Automation::Mgmt::V2015_10_31
|
|
24
24
|
#
|
25
25
|
# Retrieve the content of runbook draft identified by runbook name.
|
26
26
|
#
|
27
|
-
# @param
|
27
|
+
# @param resource_group_name [String] Name of an Azure Resource group.
|
28
|
+
# @param automation_account_name [String] The name of the automation account.
|
28
29
|
# @param runbook_name [String] The runbook name.
|
29
30
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
30
31
|
# will be added to the HTTP request.
|
31
32
|
#
|
32
33
|
# @return [NOT_IMPLEMENTED] operation results.
|
33
34
|
#
|
34
|
-
def get_content(automation_account_name, runbook_name, custom_headers:nil)
|
35
|
-
response = get_content_async(automation_account_name, runbook_name, custom_headers:custom_headers).value!
|
35
|
+
def get_content(resource_group_name, automation_account_name, runbook_name, custom_headers:nil)
|
36
|
+
response = get_content_async(resource_group_name, automation_account_name, runbook_name, custom_headers:custom_headers).value!
|
36
37
|
response.body unless response.nil?
|
37
38
|
end
|
38
39
|
|
39
40
|
#
|
40
41
|
# Retrieve the content of runbook draft identified by runbook name.
|
41
42
|
#
|
42
|
-
# @param
|
43
|
+
# @param resource_group_name [String] Name of an Azure Resource group.
|
44
|
+
# @param automation_account_name [String] The name of the automation account.
|
43
45
|
# @param runbook_name [String] The runbook name.
|
44
46
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
45
47
|
# will be added to the HTTP request.
|
46
48
|
#
|
47
49
|
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
48
50
|
#
|
49
|
-
def get_content_with_http_info(automation_account_name, runbook_name, custom_headers:nil)
|
50
|
-
get_content_async(automation_account_name, runbook_name, custom_headers:custom_headers).value!
|
51
|
+
def get_content_with_http_info(resource_group_name, automation_account_name, runbook_name, custom_headers:nil)
|
52
|
+
get_content_async(resource_group_name, automation_account_name, runbook_name, custom_headers:custom_headers).value!
|
51
53
|
end
|
52
54
|
|
53
55
|
#
|
54
56
|
# Retrieve the content of runbook draft identified by runbook name.
|
55
57
|
#
|
56
|
-
# @param
|
58
|
+
# @param resource_group_name [String] Name of an Azure Resource group.
|
59
|
+
# @param automation_account_name [String] The name of the automation account.
|
57
60
|
# @param runbook_name [String] The runbook name.
|
58
61
|
# @param [Hash{String => String}] A hash of custom headers that will be added
|
59
62
|
# to the HTTP request.
|
60
63
|
#
|
61
64
|
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
62
65
|
#
|
63
|
-
def get_content_async(automation_account_name, runbook_name, custom_headers:nil)
|
64
|
-
fail ArgumentError, '@client.
|
65
|
-
fail ArgumentError,
|
66
|
+
def get_content_async(resource_group_name, automation_account_name, runbook_name, custom_headers:nil)
|
67
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
68
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
69
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
|
70
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
|
71
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._]+$$')).nil?
|
66
72
|
fail ArgumentError, 'automation_account_name is nil' if automation_account_name.nil?
|
67
73
|
fail ArgumentError, 'runbook_name is nil' if runbook_name.nil?
|
68
|
-
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
69
74
|
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
70
75
|
|
71
76
|
|
@@ -81,7 +86,7 @@ module Azure::Automation::Mgmt::V2015_10_31
|
|
81
86
|
|
82
87
|
options = {
|
83
88
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
84
|
-
path_params: {'
|
89
|
+
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'automationAccountName' => automation_account_name,'runbookName' => runbook_name},
|
85
90
|
query_params: {'api-version' => @client.api_version},
|
86
91
|
headers: request_headers.merge(custom_headers || {}),
|
87
92
|
base_url: request_url
|
@@ -94,7 +99,7 @@ module Azure::Automation::Mgmt::V2015_10_31
|
|
94
99
|
response_content = http_response.body
|
95
100
|
unless status_code == 200
|
96
101
|
error_model = JSON.load(response_content)
|
97
|
-
fail
|
102
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
98
103
|
end
|
99
104
|
|
100
105
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
@@ -123,36 +128,49 @@ module Azure::Automation::Mgmt::V2015_10_31
|
|
123
128
|
end
|
124
129
|
|
125
130
|
#
|
126
|
-
#
|
131
|
+
# Replaces the runbook draft content.
|
127
132
|
#
|
128
|
-
# @param
|
133
|
+
# @param resource_group_name [String] Name of an Azure Resource group.
|
134
|
+
# @param automation_account_name [String] The name of the automation account.
|
129
135
|
# @param runbook_name [String] The runbook name.
|
130
|
-
# @param runbook_content The
|
136
|
+
# @param runbook_content The runbook draft content.
|
131
137
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
132
138
|
# will be added to the HTTP request.
|
133
139
|
#
|
134
|
-
|
135
|
-
|
136
|
-
|
140
|
+
# @return [NOT_IMPLEMENTED] operation results.
|
141
|
+
#
|
142
|
+
def replace_content(resource_group_name, automation_account_name, runbook_name, runbook_content, custom_headers:nil)
|
143
|
+
response = replace_content_async(resource_group_name, automation_account_name, runbook_name, runbook_content, custom_headers:custom_headers).value!
|
144
|
+
response.body unless response.nil?
|
137
145
|
end
|
138
146
|
|
139
147
|
#
|
140
|
-
# @param
|
148
|
+
# @param resource_group_name [String] Name of an Azure Resource group.
|
149
|
+
# @param automation_account_name [String] The name of the automation account.
|
141
150
|
# @param runbook_name [String] The runbook name.
|
142
|
-
# @param runbook_content The
|
151
|
+
# @param runbook_content The runbook draft content.
|
143
152
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
144
153
|
# will be added to the HTTP request.
|
145
154
|
#
|
146
155
|
# @return [Concurrent::Promise] promise which provides async access to http
|
147
156
|
# response.
|
148
157
|
#
|
149
|
-
def
|
158
|
+
def replace_content_async(resource_group_name, automation_account_name, runbook_name, runbook_content, custom_headers:nil)
|
150
159
|
# Send request
|
151
|
-
promise =
|
160
|
+
promise = begin_replace_content_async(resource_group_name, automation_account_name, runbook_name, runbook_content, custom_headers:custom_headers)
|
152
161
|
|
153
162
|
promise = promise.then do |response|
|
154
163
|
# Defining deserialization method.
|
155
164
|
deserialize_method = lambda do |parsed_response|
|
165
|
+
result_mapper = {
|
166
|
+
client_side_validation: true,
|
167
|
+
required: false,
|
168
|
+
serialized_name: 'parsed_response',
|
169
|
+
type: {
|
170
|
+
name: 'Stream'
|
171
|
+
}
|
172
|
+
}
|
173
|
+
parsed_response = @client.deserialize(result_mapper, parsed_response)
|
156
174
|
end
|
157
175
|
|
158
176
|
# Waiting for response.
|
@@ -165,48 +183,53 @@ module Azure::Automation::Mgmt::V2015_10_31
|
|
165
183
|
#
|
166
184
|
# Retrieve the runbook draft identified by runbook name.
|
167
185
|
#
|
168
|
-
# @param
|
186
|
+
# @param resource_group_name [String] Name of an Azure Resource group.
|
187
|
+
# @param automation_account_name [String] The name of the automation account.
|
169
188
|
# @param runbook_name [String] The runbook name.
|
170
189
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
171
190
|
# will be added to the HTTP request.
|
172
191
|
#
|
173
192
|
# @return [RunbookDraft] operation results.
|
174
193
|
#
|
175
|
-
def get(automation_account_name, runbook_name, custom_headers:nil)
|
176
|
-
response = get_async(automation_account_name, runbook_name, custom_headers:custom_headers).value!
|
194
|
+
def get(resource_group_name, automation_account_name, runbook_name, custom_headers:nil)
|
195
|
+
response = get_async(resource_group_name, automation_account_name, runbook_name, custom_headers:custom_headers).value!
|
177
196
|
response.body unless response.nil?
|
178
197
|
end
|
179
198
|
|
180
199
|
#
|
181
200
|
# Retrieve the runbook draft identified by runbook name.
|
182
201
|
#
|
183
|
-
# @param
|
202
|
+
# @param resource_group_name [String] Name of an Azure Resource group.
|
203
|
+
# @param automation_account_name [String] The name of the automation account.
|
184
204
|
# @param runbook_name [String] The runbook name.
|
185
205
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
186
206
|
# will be added to the HTTP request.
|
187
207
|
#
|
188
208
|
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
189
209
|
#
|
190
|
-
def get_with_http_info(automation_account_name, runbook_name, custom_headers:nil)
|
191
|
-
get_async(automation_account_name, runbook_name, custom_headers:custom_headers).value!
|
210
|
+
def get_with_http_info(resource_group_name, automation_account_name, runbook_name, custom_headers:nil)
|
211
|
+
get_async(resource_group_name, automation_account_name, runbook_name, custom_headers:custom_headers).value!
|
192
212
|
end
|
193
213
|
|
194
214
|
#
|
195
215
|
# Retrieve the runbook draft identified by runbook name.
|
196
216
|
#
|
197
|
-
# @param
|
217
|
+
# @param resource_group_name [String] Name of an Azure Resource group.
|
218
|
+
# @param automation_account_name [String] The name of the automation account.
|
198
219
|
# @param runbook_name [String] The runbook name.
|
199
220
|
# @param [Hash{String => String}] A hash of custom headers that will be added
|
200
221
|
# to the HTTP request.
|
201
222
|
#
|
202
223
|
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
203
224
|
#
|
204
|
-
def get_async(automation_account_name, runbook_name, custom_headers:nil)
|
205
|
-
fail ArgumentError, '@client.
|
206
|
-
fail ArgumentError,
|
225
|
+
def get_async(resource_group_name, automation_account_name, runbook_name, custom_headers:nil)
|
226
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
227
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
228
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
|
229
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
|
230
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._]+$$')).nil?
|
207
231
|
fail ArgumentError, 'automation_account_name is nil' if automation_account_name.nil?
|
208
232
|
fail ArgumentError, 'runbook_name is nil' if runbook_name.nil?
|
209
|
-
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
210
233
|
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
211
234
|
|
212
235
|
|
@@ -222,7 +245,7 @@ module Azure::Automation::Mgmt::V2015_10_31
|
|
222
245
|
|
223
246
|
options = {
|
224
247
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
225
|
-
path_params: {'
|
248
|
+
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'automationAccountName' => automation_account_name,'runbookName' => runbook_name},
|
226
249
|
query_params: {'api-version' => @client.api_version},
|
227
250
|
headers: request_headers.merge(custom_headers || {}),
|
228
251
|
base_url: request_url
|
@@ -259,21 +282,21 @@ module Azure::Automation::Mgmt::V2015_10_31
|
|
259
282
|
#
|
260
283
|
# Publish runbook draft.
|
261
284
|
#
|
262
|
-
# @param
|
285
|
+
# @param resource_group_name [String] Name of an Azure Resource group.
|
286
|
+
# @param automation_account_name [String] The name of the automation account.
|
263
287
|
# @param runbook_name [String] The parameters supplied to the publish runbook
|
264
288
|
# operation.
|
265
289
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
266
290
|
# will be added to the HTTP request.
|
267
291
|
#
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
response = publish_async(automation_account_name, runbook_name, custom_headers:custom_headers).value!
|
272
|
-
response.body unless response.nil?
|
292
|
+
def publish(resource_group_name, automation_account_name, runbook_name, custom_headers:nil)
|
293
|
+
response = publish_async(resource_group_name, automation_account_name, runbook_name, custom_headers:custom_headers).value!
|
294
|
+
nil
|
273
295
|
end
|
274
296
|
|
275
297
|
#
|
276
|
-
# @param
|
298
|
+
# @param resource_group_name [String] Name of an Azure Resource group.
|
299
|
+
# @param automation_account_name [String] The name of the automation account.
|
277
300
|
# @param runbook_name [String] The parameters supplied to the publish runbook
|
278
301
|
# operation.
|
279
302
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
@@ -282,15 +305,13 @@ module Azure::Automation::Mgmt::V2015_10_31
|
|
282
305
|
# @return [Concurrent::Promise] promise which provides async access to http
|
283
306
|
# response.
|
284
307
|
#
|
285
|
-
def publish_async(automation_account_name, runbook_name, custom_headers:nil)
|
308
|
+
def publish_async(resource_group_name, automation_account_name, runbook_name, custom_headers:nil)
|
286
309
|
# Send request
|
287
|
-
promise = begin_publish_async(automation_account_name, runbook_name, custom_headers:custom_headers)
|
310
|
+
promise = begin_publish_async(resource_group_name, automation_account_name, runbook_name, custom_headers:custom_headers)
|
288
311
|
|
289
312
|
promise = promise.then do |response|
|
290
313
|
# Defining deserialization method.
|
291
314
|
deserialize_method = lambda do |parsed_response|
|
292
|
-
result_mapper = Azure::Automation::Mgmt::V2015_10_31::Models::Runbook.mapper()
|
293
|
-
parsed_response = @client.deserialize(result_mapper, parsed_response)
|
294
315
|
end
|
295
316
|
|
296
317
|
# Waiting for response.
|
@@ -301,50 +322,55 @@ module Azure::Automation::Mgmt::V2015_10_31
|
|
301
322
|
end
|
302
323
|
|
303
324
|
#
|
304
|
-
#
|
325
|
+
# Undo draft edit to last known published state identified by runbook name.
|
305
326
|
#
|
306
|
-
# @param
|
327
|
+
# @param resource_group_name [String] Name of an Azure Resource group.
|
328
|
+
# @param automation_account_name [String] The name of the automation account.
|
307
329
|
# @param runbook_name [String] The runbook name.
|
308
330
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
309
331
|
# will be added to the HTTP request.
|
310
332
|
#
|
311
333
|
# @return [RunbookDraftUndoEditResult] operation results.
|
312
334
|
#
|
313
|
-
def undo_edit(automation_account_name, runbook_name, custom_headers:nil)
|
314
|
-
response = undo_edit_async(automation_account_name, runbook_name, custom_headers:custom_headers).value!
|
335
|
+
def undo_edit(resource_group_name, automation_account_name, runbook_name, custom_headers:nil)
|
336
|
+
response = undo_edit_async(resource_group_name, automation_account_name, runbook_name, custom_headers:custom_headers).value!
|
315
337
|
response.body unless response.nil?
|
316
338
|
end
|
317
339
|
|
318
340
|
#
|
319
|
-
#
|
341
|
+
# Undo draft edit to last known published state identified by runbook name.
|
320
342
|
#
|
321
|
-
# @param
|
343
|
+
# @param resource_group_name [String] Name of an Azure Resource group.
|
344
|
+
# @param automation_account_name [String] The name of the automation account.
|
322
345
|
# @param runbook_name [String] The runbook name.
|
323
346
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
324
347
|
# will be added to the HTTP request.
|
325
348
|
#
|
326
349
|
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
327
350
|
#
|
328
|
-
def undo_edit_with_http_info(automation_account_name, runbook_name, custom_headers:nil)
|
329
|
-
undo_edit_async(automation_account_name, runbook_name, custom_headers:custom_headers).value!
|
351
|
+
def undo_edit_with_http_info(resource_group_name, automation_account_name, runbook_name, custom_headers:nil)
|
352
|
+
undo_edit_async(resource_group_name, automation_account_name, runbook_name, custom_headers:custom_headers).value!
|
330
353
|
end
|
331
354
|
|
332
355
|
#
|
333
|
-
#
|
356
|
+
# Undo draft edit to last known published state identified by runbook name.
|
334
357
|
#
|
335
|
-
# @param
|
358
|
+
# @param resource_group_name [String] Name of an Azure Resource group.
|
359
|
+
# @param automation_account_name [String] The name of the automation account.
|
336
360
|
# @param runbook_name [String] The runbook name.
|
337
361
|
# @param [Hash{String => String}] A hash of custom headers that will be added
|
338
362
|
# to the HTTP request.
|
339
363
|
#
|
340
364
|
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
341
365
|
#
|
342
|
-
def undo_edit_async(automation_account_name, runbook_name, custom_headers:nil)
|
343
|
-
fail ArgumentError, '@client.
|
344
|
-
fail ArgumentError,
|
366
|
+
def undo_edit_async(resource_group_name, automation_account_name, runbook_name, custom_headers:nil)
|
367
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
368
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
369
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
|
370
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
|
371
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._]+$$')).nil?
|
345
372
|
fail ArgumentError, 'automation_account_name is nil' if automation_account_name.nil?
|
346
373
|
fail ArgumentError, 'runbook_name is nil' if runbook_name.nil?
|
347
|
-
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
348
374
|
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
349
375
|
|
350
376
|
|
@@ -360,7 +386,7 @@ module Azure::Automation::Mgmt::V2015_10_31
|
|
360
386
|
|
361
387
|
options = {
|
362
388
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
363
|
-
path_params: {'
|
389
|
+
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'automationAccountName' => automation_account_name,'runbookName' => runbook_name},
|
364
390
|
query_params: {'api-version' => @client.api_version},
|
365
391
|
headers: request_headers.merge(custom_headers || {}),
|
366
392
|
base_url: request_url
|
@@ -395,58 +421,64 @@ module Azure::Automation::Mgmt::V2015_10_31
|
|
395
421
|
end
|
396
422
|
|
397
423
|
#
|
398
|
-
#
|
424
|
+
# Replaces the runbook draft content.
|
399
425
|
#
|
400
|
-
# @param
|
426
|
+
# @param resource_group_name [String] Name of an Azure Resource group.
|
427
|
+
# @param automation_account_name [String] The name of the automation account.
|
401
428
|
# @param runbook_name [String] The runbook name.
|
402
|
-
# @param runbook_content The
|
429
|
+
# @param runbook_content The runbook draft content.
|
403
430
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
404
431
|
# will be added to the HTTP request.
|
405
432
|
#
|
433
|
+
# @return [NOT_IMPLEMENTED] operation results.
|
406
434
|
#
|
407
|
-
def
|
408
|
-
response =
|
409
|
-
nil
|
435
|
+
def begin_replace_content(resource_group_name, automation_account_name, runbook_name, runbook_content, custom_headers:nil)
|
436
|
+
response = begin_replace_content_async(resource_group_name, automation_account_name, runbook_name, runbook_content, custom_headers:custom_headers).value!
|
437
|
+
response.body unless response.nil?
|
410
438
|
end
|
411
439
|
|
412
440
|
#
|
413
|
-
#
|
441
|
+
# Replaces the runbook draft content.
|
414
442
|
#
|
415
|
-
# @param
|
443
|
+
# @param resource_group_name [String] Name of an Azure Resource group.
|
444
|
+
# @param automation_account_name [String] The name of the automation account.
|
416
445
|
# @param runbook_name [String] The runbook name.
|
417
|
-
# @param runbook_content The
|
446
|
+
# @param runbook_content The runbook draft content.
|
418
447
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
419
448
|
# will be added to the HTTP request.
|
420
449
|
#
|
421
450
|
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
422
451
|
#
|
423
|
-
def
|
424
|
-
|
452
|
+
def begin_replace_content_with_http_info(resource_group_name, automation_account_name, runbook_name, runbook_content, custom_headers:nil)
|
453
|
+
begin_replace_content_async(resource_group_name, automation_account_name, runbook_name, runbook_content, custom_headers:custom_headers).value!
|
425
454
|
end
|
426
455
|
|
427
456
|
#
|
428
|
-
#
|
457
|
+
# Replaces the runbook draft content.
|
429
458
|
#
|
430
|
-
# @param
|
459
|
+
# @param resource_group_name [String] Name of an Azure Resource group.
|
460
|
+
# @param automation_account_name [String] The name of the automation account.
|
431
461
|
# @param runbook_name [String] The runbook name.
|
432
|
-
# @param runbook_content The
|
462
|
+
# @param runbook_content The runbook draft content.
|
433
463
|
# @param [Hash{String => String}] A hash of custom headers that will be added
|
434
464
|
# to the HTTP request.
|
435
465
|
#
|
436
466
|
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
437
467
|
#
|
438
|
-
def
|
439
|
-
fail ArgumentError, '@client.
|
440
|
-
fail ArgumentError,
|
468
|
+
def begin_replace_content_async(resource_group_name, automation_account_name, runbook_name, runbook_content, custom_headers:nil)
|
469
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
470
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
471
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
|
472
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
|
473
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._]+$$')).nil?
|
441
474
|
fail ArgumentError, 'automation_account_name is nil' if automation_account_name.nil?
|
442
475
|
fail ArgumentError, 'runbook_name is nil' if runbook_name.nil?
|
443
476
|
fail ArgumentError, 'runbook_content is nil' if runbook_content.nil?
|
444
|
-
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
445
477
|
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
446
478
|
|
447
479
|
|
448
480
|
request_headers = {}
|
449
|
-
request_headers['Content-Type'] = '
|
481
|
+
request_headers['Content-Type'] = 'text/powershell'
|
450
482
|
|
451
483
|
# Set Headers
|
452
484
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
@@ -469,7 +501,7 @@ module Azure::Automation::Mgmt::V2015_10_31
|
|
469
501
|
|
470
502
|
options = {
|
471
503
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
472
|
-
path_params: {'
|
504
|
+
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'automationAccountName' => automation_account_name,'runbookName' => runbook_name},
|
473
505
|
query_params: {'api-version' => @client.api_version},
|
474
506
|
body: request_content,
|
475
507
|
headers: request_headers.merge(custom_headers || {}),
|
@@ -481,12 +513,29 @@ module Azure::Automation::Mgmt::V2015_10_31
|
|
481
513
|
http_response = result.response
|
482
514
|
status_code = http_response.status
|
483
515
|
response_content = http_response.body
|
484
|
-
unless status_code ==
|
516
|
+
unless status_code == 200 || status_code == 202
|
485
517
|
error_model = JSON.load(response_content)
|
486
518
|
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
487
519
|
end
|
488
520
|
|
489
521
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
522
|
+
# Deserialize Response
|
523
|
+
if status_code == 200
|
524
|
+
begin
|
525
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
526
|
+
result_mapper = {
|
527
|
+
client_side_validation: true,
|
528
|
+
required: false,
|
529
|
+
serialized_name: 'parsed_response',
|
530
|
+
type: {
|
531
|
+
name: 'Stream'
|
532
|
+
}
|
533
|
+
}
|
534
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
535
|
+
rescue Exception => e
|
536
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
537
|
+
end
|
538
|
+
end
|
490
539
|
|
491
540
|
result
|
492
541
|
end
|
@@ -497,23 +546,24 @@ module Azure::Automation::Mgmt::V2015_10_31
|
|
497
546
|
#
|
498
547
|
# Publish runbook draft.
|
499
548
|
#
|
500
|
-
# @param
|
549
|
+
# @param resource_group_name [String] Name of an Azure Resource group.
|
550
|
+
# @param automation_account_name [String] The name of the automation account.
|
501
551
|
# @param runbook_name [String] The parameters supplied to the publish runbook
|
502
552
|
# operation.
|
503
553
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
504
554
|
# will be added to the HTTP request.
|
505
555
|
#
|
506
|
-
# @return [Runbook] operation results.
|
507
556
|
#
|
508
|
-
def begin_publish(automation_account_name, runbook_name, custom_headers:nil)
|
509
|
-
response = begin_publish_async(automation_account_name, runbook_name, custom_headers:custom_headers).value!
|
510
|
-
|
557
|
+
def begin_publish(resource_group_name, automation_account_name, runbook_name, custom_headers:nil)
|
558
|
+
response = begin_publish_async(resource_group_name, automation_account_name, runbook_name, custom_headers:custom_headers).value!
|
559
|
+
nil
|
511
560
|
end
|
512
561
|
|
513
562
|
#
|
514
563
|
# Publish runbook draft.
|
515
564
|
#
|
516
|
-
# @param
|
565
|
+
# @param resource_group_name [String] Name of an Azure Resource group.
|
566
|
+
# @param automation_account_name [String] The name of the automation account.
|
517
567
|
# @param runbook_name [String] The parameters supplied to the publish runbook
|
518
568
|
# operation.
|
519
569
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
@@ -521,14 +571,15 @@ module Azure::Automation::Mgmt::V2015_10_31
|
|
521
571
|
#
|
522
572
|
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
523
573
|
#
|
524
|
-
def begin_publish_with_http_info(automation_account_name, runbook_name, custom_headers:nil)
|
525
|
-
begin_publish_async(automation_account_name, runbook_name, custom_headers:custom_headers).value!
|
574
|
+
def begin_publish_with_http_info(resource_group_name, automation_account_name, runbook_name, custom_headers:nil)
|
575
|
+
begin_publish_async(resource_group_name, automation_account_name, runbook_name, custom_headers:custom_headers).value!
|
526
576
|
end
|
527
577
|
|
528
578
|
#
|
529
579
|
# Publish runbook draft.
|
530
580
|
#
|
531
|
-
# @param
|
581
|
+
# @param resource_group_name [String] Name of an Azure Resource group.
|
582
|
+
# @param automation_account_name [String] The name of the automation account.
|
532
583
|
# @param runbook_name [String] The parameters supplied to the publish runbook
|
533
584
|
# operation.
|
534
585
|
# @param [Hash{String => String}] A hash of custom headers that will be added
|
@@ -536,12 +587,14 @@ module Azure::Automation::Mgmt::V2015_10_31
|
|
536
587
|
#
|
537
588
|
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
538
589
|
#
|
539
|
-
def begin_publish_async(automation_account_name, runbook_name, custom_headers:nil)
|
540
|
-
fail ArgumentError, '@client.
|
541
|
-
fail ArgumentError,
|
590
|
+
def begin_publish_async(resource_group_name, automation_account_name, runbook_name, custom_headers:nil)
|
591
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
592
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
593
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
|
594
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
|
595
|
+
fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._]+$$')).nil?
|
542
596
|
fail ArgumentError, 'automation_account_name is nil' if automation_account_name.nil?
|
543
597
|
fail ArgumentError, 'runbook_name is nil' if runbook_name.nil?
|
544
|
-
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
545
598
|
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
546
599
|
|
547
600
|
|
@@ -557,7 +610,7 @@ module Azure::Automation::Mgmt::V2015_10_31
|
|
557
610
|
|
558
611
|
options = {
|
559
612
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
560
|
-
path_params: {'
|
613
|
+
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'automationAccountName' => automation_account_name,'runbookName' => runbook_name},
|
561
614
|
query_params: {'api-version' => @client.api_version},
|
562
615
|
headers: request_headers.merge(custom_headers || {}),
|
563
616
|
base_url: request_url
|
@@ -568,22 +621,12 @@ module Azure::Automation::Mgmt::V2015_10_31
|
|
568
621
|
http_response = result.response
|
569
622
|
status_code = http_response.status
|
570
623
|
response_content = http_response.body
|
571
|
-
unless status_code == 202
|
624
|
+
unless status_code == 202
|
572
625
|
error_model = JSON.load(response_content)
|
573
626
|
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
574
627
|
end
|
575
628
|
|
576
629
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
577
|
-
# Deserialize Response
|
578
|
-
if status_code == 200
|
579
|
-
begin
|
580
|
-
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
581
|
-
result_mapper = Azure::Automation::Mgmt::V2015_10_31::Models::Runbook.mapper()
|
582
|
-
result.body = @client.deserialize(result_mapper, parsed_response)
|
583
|
-
rescue Exception => e
|
584
|
-
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
585
|
-
end
|
586
|
-
end
|
587
630
|
|
588
631
|
result
|
589
632
|
end
|