azure_mgmt_devtestlabs 0.10.0 → 0.11.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/generated/azure_mgmt_devtestlabs.rb +149 -55
- data/lib/generated/azure_mgmt_devtestlabs/arm_templates.rb +363 -0
- data/lib/generated/azure_mgmt_devtestlabs/{artifact_source_operations.rb → artifact_sources.rb} +85 -69
- data/lib/generated/azure_mgmt_devtestlabs/{artifact_operations.rb → artifacts.rb} +59 -43
- data/lib/generated/azure_mgmt_devtestlabs/costs.rb +244 -0
- data/lib/generated/azure_mgmt_devtestlabs/{custom_image_operations.rb → custom_images.rb} +81 -68
- data/lib/generated/azure_mgmt_devtestlabs/dev_test_labs_client.rb +73 -37
- data/lib/generated/azure_mgmt_devtestlabs/disks.rb +975 -0
- data/lib/generated/azure_mgmt_devtestlabs/environments.rb +672 -0
- data/lib/generated/azure_mgmt_devtestlabs/{formula_operations.rb → formulas.rb} +82 -64
- data/lib/generated/azure_mgmt_devtestlabs/{gallery_image_operations.rb → gallery_images.rb} +33 -26
- data/lib/generated/azure_mgmt_devtestlabs/global_schedules.rb +1121 -0
- data/lib/generated/azure_mgmt_devtestlabs/{lab_operations.rb → labs.rb} +439 -141
- data/lib/generated/azure_mgmt_devtestlabs/models/applicable_schedule.rb +105 -0
- data/lib/generated/azure_mgmt_devtestlabs/models/applicable_schedule_fragment.rb +105 -0
- data/lib/generated/azure_mgmt_devtestlabs/models/apply_artifacts_request.rb +2 -1
- data/lib/generated/azure_mgmt_devtestlabs/models/arm_template.rb +167 -0
- data/lib/generated/azure_mgmt_devtestlabs/models/arm_template_info.rb +2 -1
- data/lib/generated/azure_mgmt_devtestlabs/models/arm_template_parameter_properties.rb +55 -0
- data/lib/generated/azure_mgmt_devtestlabs/models/artifact.rb +70 -53
- data/lib/generated/azure_mgmt_devtestlabs/models/artifact_deployment_status_properties.rb +2 -1
- data/lib/generated/azure_mgmt_devtestlabs/models/artifact_deployment_status_properties_fragment.rb +68 -0
- data/lib/generated/azure_mgmt_devtestlabs/models/artifact_install_properties.rb +43 -1
- data/lib/generated/azure_mgmt_devtestlabs/models/artifact_install_properties_fragment.rb +105 -0
- data/lib/generated/azure_mgmt_devtestlabs/models/artifact_parameter_properties.rb +2 -1
- data/lib/generated/azure_mgmt_devtestlabs/models/artifact_parameter_properties_fragment.rb +55 -0
- data/lib/generated/azure_mgmt_devtestlabs/models/artifact_source.rb +75 -62
- data/lib/generated/azure_mgmt_devtestlabs/models/artifact_source_fragment.rb +185 -0
- data/lib/generated/azure_mgmt_devtestlabs/models/attach_disk_properties.rb +46 -0
- data/lib/generated/azure_mgmt_devtestlabs/models/attach_new_data_disk_options.rb +66 -0
- data/lib/generated/azure_mgmt_devtestlabs/models/bulk_creation_parameters.rb +45 -0
- data/lib/generated/azure_mgmt_devtestlabs/models/compute_data_disk.rb +76 -0
- data/lib/generated/azure_mgmt_devtestlabs/models/compute_data_disk_fragment.rb +76 -0
- data/lib/generated/azure_mgmt_devtestlabs/models/compute_vm_instance_view_status.rb +65 -0
- data/lib/generated/azure_mgmt_devtestlabs/models/compute_vm_instance_view_status_fragment.rb +65 -0
- data/lib/generated/azure_mgmt_devtestlabs/models/compute_vm_properties.rb +131 -0
- data/lib/generated/azure_mgmt_devtestlabs/models/compute_vm_properties_fragment.rb +131 -0
- data/lib/generated/azure_mgmt_devtestlabs/models/cost_threshold_properties.rb +92 -0
- data/lib/generated/azure_mgmt_devtestlabs/models/cost_threshold_status.rb +16 -0
- data/lib/generated/azure_mgmt_devtestlabs/models/{lab_cost_type.rb → cost_type.rb} +3 -3
- data/lib/generated/azure_mgmt_devtestlabs/models/custom_image.rb +58 -57
- data/lib/generated/azure_mgmt_devtestlabs/models/custom_image_os_type.rb +1 -1
- data/lib/generated/azure_mgmt_devtestlabs/models/custom_image_properties_custom.rb +5 -4
- data/lib/generated/azure_mgmt_devtestlabs/models/custom_image_properties_from_vm.rb +2 -1
- data/lib/generated/azure_mgmt_devtestlabs/models/data_disk_properties.rb +70 -0
- data/lib/generated/azure_mgmt_devtestlabs/models/day_details.rb +3 -2
- data/lib/generated/azure_mgmt_devtestlabs/models/{subscription_notification_properties.rb → day_details_fragment.rb} +11 -11
- data/lib/generated/azure_mgmt_devtestlabs/models/detach_data_disk_properties.rb +46 -0
- data/lib/generated/azure_mgmt_devtestlabs/models/detach_disk_properties.rb +46 -0
- data/lib/generated/azure_mgmt_devtestlabs/models/disk.rb +186 -0
- data/lib/generated/azure_mgmt_devtestlabs/models/dtl_environment.rb +146 -0
- data/lib/generated/azure_mgmt_devtestlabs/models/enable_status.rb +1 -1
- data/lib/generated/azure_mgmt_devtestlabs/models/environment_deployment_properties.rb +64 -0
- data/lib/generated/azure_mgmt_devtestlabs/models/evaluate_policies_properties.rb +2 -1
- data/lib/generated/azure_mgmt_devtestlabs/models/evaluate_policies_request.rb +2 -1
- data/lib/generated/azure_mgmt_devtestlabs/models/evaluate_policies_response.rb +2 -1
- data/lib/generated/azure_mgmt_devtestlabs/models/event.rb +47 -0
- data/lib/generated/azure_mgmt_devtestlabs/models/event_fragment.rb +47 -0
- data/lib/generated/azure_mgmt_devtestlabs/models/export_resource_usage_parameters.rb +58 -0
- data/lib/generated/azure_mgmt_devtestlabs/models/external_subnet.rb +55 -0
- data/lib/generated/azure_mgmt_devtestlabs/models/external_subnet_fragment.rb +55 -0
- data/lib/generated/azure_mgmt_devtestlabs/models/file_upload_options.rb +16 -0
- data/lib/generated/azure_mgmt_devtestlabs/models/formula.rb +53 -61
- data/lib/generated/azure_mgmt_devtestlabs/models/formula_properties_from_vm.rb +2 -1
- data/lib/generated/azure_mgmt_devtestlabs/models/gallery_image.rb +44 -54
- data/lib/generated/azure_mgmt_devtestlabs/models/gallery_image_reference.rb +2 -1
- data/lib/generated/azure_mgmt_devtestlabs/models/gallery_image_reference_fragment.rb +85 -0
- data/lib/generated/azure_mgmt_devtestlabs/models/generate_arm_template_request.rb +14 -1
- data/lib/generated/azure_mgmt_devtestlabs/models/generate_upload_uri_parameter.rb +2 -1
- data/lib/generated/azure_mgmt_devtestlabs/models/generate_upload_uri_response.rb +2 -1
- data/lib/generated/azure_mgmt_devtestlabs/models/host_caching_options.rb +17 -0
- data/lib/generated/azure_mgmt_devtestlabs/models/hour_details.rb +2 -1
- data/lib/generated/azure_mgmt_devtestlabs/models/hour_details_fragment.rb +45 -0
- data/lib/generated/azure_mgmt_devtestlabs/models/identity_properties.rb +75 -0
- data/lib/generated/azure_mgmt_devtestlabs/models/inbound_nat_rule.rb +70 -0
- data/lib/generated/azure_mgmt_devtestlabs/models/inbound_nat_rule_fragment.rb +70 -0
- data/lib/generated/azure_mgmt_devtestlabs/models/lab.rb +85 -54
- data/lib/generated/azure_mgmt_devtestlabs/models/lab_cost.rb +204 -0
- data/lib/generated/azure_mgmt_devtestlabs/models/{cost_per_day_properties.rb → lab_cost_details_properties.rb} +7 -6
- data/lib/generated/azure_mgmt_devtestlabs/models/lab_cost_summary_properties.rb +45 -0
- data/lib/generated/azure_mgmt_devtestlabs/models/lab_fragment.rb +127 -0
- data/lib/generated/azure_mgmt_devtestlabs/models/{resource_cost_properties.rb → lab_resource_cost_properties.rb} +49 -28
- data/lib/generated/azure_mgmt_devtestlabs/models/lab_vhd.rb +3 -2
- data/lib/generated/azure_mgmt_devtestlabs/models/lab_virtual_machine.rb +141 -42
- data/lib/generated/azure_mgmt_devtestlabs/models/lab_virtual_machine_creation_parameter.rb +412 -0
- data/lib/generated/azure_mgmt_devtestlabs/models/lab_virtual_machine_fragment.rb +410 -0
- data/lib/generated/azure_mgmt_devtestlabs/models/linux_os_info.rb +5 -3
- data/lib/generated/azure_mgmt_devtestlabs/models/linux_os_state.rb +1 -1
- data/lib/generated/azure_mgmt_devtestlabs/models/network_interface_properties.rb +130 -0
- data/lib/generated/azure_mgmt_devtestlabs/models/network_interface_properties_fragment.rb +130 -0
- data/lib/generated/azure_mgmt_devtestlabs/models/notification_channel.rb +150 -0
- data/lib/generated/azure_mgmt_devtestlabs/models/notification_channel_event_type.rb +16 -0
- data/lib/generated/azure_mgmt_devtestlabs/models/{cost.rb → notification_channel_fragment.rb} +64 -64
- data/lib/generated/azure_mgmt_devtestlabs/models/notification_settings.rb +69 -0
- data/lib/generated/azure_mgmt_devtestlabs/models/notification_settings_fragment.rb +69 -0
- data/lib/generated/azure_mgmt_devtestlabs/models/notification_status.rb +16 -0
- data/lib/generated/azure_mgmt_devtestlabs/models/notify_parameters.rb +56 -0
- data/lib/generated/azure_mgmt_devtestlabs/models/parameter_info.rb +5 -5
- data/lib/generated/azure_mgmt_devtestlabs/models/parameters_value_file_info.rb +55 -0
- data/lib/generated/azure_mgmt_devtestlabs/models/percentage_cost_threshold_properties.rb +45 -0
- data/lib/generated/azure_mgmt_devtestlabs/models/policy.rb +62 -58
- data/lib/generated/azure_mgmt_devtestlabs/models/policy_evaluator_type.rb +1 -1
- data/lib/generated/azure_mgmt_devtestlabs/models/policy_fact_name.rb +4 -1
- data/lib/generated/azure_mgmt_devtestlabs/models/policy_fragment.rb +168 -0
- data/lib/generated/azure_mgmt_devtestlabs/models/policy_set_result.rb +2 -1
- data/lib/generated/azure_mgmt_devtestlabs/models/policy_status.rb +1 -1
- data/lib/generated/azure_mgmt_devtestlabs/models/policy_violation.rb +2 -1
- data/lib/generated/azure_mgmt_devtestlabs/models/port.rb +56 -0
- data/lib/generated/azure_mgmt_devtestlabs/models/port_fragment.rb +56 -0
- data/lib/generated/azure_mgmt_devtestlabs/models/premium_data_disk.rb +16 -0
- data/lib/generated/azure_mgmt_devtestlabs/models/reporting_cycle_type.rb +16 -0
- data/lib/generated/azure_mgmt_devtestlabs/models/response_with_continuation_arm_template.rb +94 -0
- data/lib/generated/azure_mgmt_devtestlabs/models/response_with_continuation_artifact.rb +2 -1
- data/lib/generated/azure_mgmt_devtestlabs/models/response_with_continuation_artifact_source.rb +2 -1
- data/lib/generated/azure_mgmt_devtestlabs/models/response_with_continuation_custom_image.rb +2 -1
- data/lib/generated/azure_mgmt_devtestlabs/models/response_with_continuation_disk.rb +94 -0
- data/lib/generated/azure_mgmt_devtestlabs/models/response_with_continuation_dtl_environment.rb +95 -0
- data/lib/generated/azure_mgmt_devtestlabs/models/response_with_continuation_formula.rb +2 -1
- data/lib/generated/azure_mgmt_devtestlabs/models/response_with_continuation_gallery_image.rb +2 -1
- data/lib/generated/azure_mgmt_devtestlabs/models/response_with_continuation_lab.rb +2 -1
- data/lib/generated/azure_mgmt_devtestlabs/models/response_with_continuation_lab_vhd.rb +2 -1
- data/lib/generated/azure_mgmt_devtestlabs/models/response_with_continuation_lab_virtual_machine.rb +2 -1
- data/lib/generated/azure_mgmt_devtestlabs/models/response_with_continuation_notification_channel.rb +96 -0
- data/lib/generated/azure_mgmt_devtestlabs/models/response_with_continuation_policy.rb +2 -1
- data/lib/generated/azure_mgmt_devtestlabs/models/response_with_continuation_schedule.rb +2 -1
- data/lib/generated/azure_mgmt_devtestlabs/models/response_with_continuation_secret.rb +94 -0
- data/lib/generated/azure_mgmt_devtestlabs/models/response_with_continuation_service_runner.rb +94 -0
- data/lib/generated/azure_mgmt_devtestlabs/models/response_with_continuation_user.rb +94 -0
- data/lib/generated/azure_mgmt_devtestlabs/models/response_with_continuation_virtual_network.rb +2 -1
- data/lib/generated/azure_mgmt_devtestlabs/models/retarget_schedule_properties.rb +57 -0
- data/lib/generated/azure_mgmt_devtestlabs/models/schedule.rb +82 -57
- data/lib/generated/azure_mgmt_devtestlabs/models/schedule_fragment.rb +189 -0
- data/lib/generated/azure_mgmt_devtestlabs/models/secret.rb +110 -0
- data/lib/generated/azure_mgmt_devtestlabs/models/service_runner.rb +91 -0
- data/lib/generated/azure_mgmt_devtestlabs/models/shared_public_ip_address_configuration.rb +54 -0
- data/lib/generated/azure_mgmt_devtestlabs/models/shared_public_ip_address_configuration_fragment.rb +55 -0
- data/lib/generated/azure_mgmt_devtestlabs/models/shutdown_notification_content.rb +147 -0
- data/lib/generated/azure_mgmt_devtestlabs/models/source_control_type.rb +1 -1
- data/lib/generated/azure_mgmt_devtestlabs/models/{lab_storage_type.rb → storage_type.rb} +3 -3
- data/lib/generated/azure_mgmt_devtestlabs/models/subnet.rb +8 -7
- data/lib/generated/azure_mgmt_devtestlabs/models/subnet_fragment.rb +67 -0
- data/lib/generated/azure_mgmt_devtestlabs/models/subnet_override.rb +29 -6
- data/lib/generated/azure_mgmt_devtestlabs/models/subnet_override_fragment.rb +101 -0
- data/lib/generated/azure_mgmt_devtestlabs/models/subnet_shared_public_ip_address_configuration.rb +54 -0
- data/lib/generated/azure_mgmt_devtestlabs/models/subnet_shared_public_ip_address_configuration_fragment.rb +55 -0
- data/lib/generated/azure_mgmt_devtestlabs/models/target_cost_properties.rb +105 -0
- data/lib/generated/azure_mgmt_devtestlabs/models/target_cost_status.rb +16 -0
- data/lib/generated/azure_mgmt_devtestlabs/models/transport_protocol.rb +16 -0
- data/lib/generated/azure_mgmt_devtestlabs/models/usage_permission_type.rb +1 -1
- data/lib/generated/azure_mgmt_devtestlabs/models/user.rb +133 -0
- data/lib/generated/azure_mgmt_devtestlabs/models/user_fragment.rb +122 -0
- data/lib/generated/azure_mgmt_devtestlabs/models/user_identity.rb +91 -0
- data/lib/generated/azure_mgmt_devtestlabs/models/user_identity_fragment.rb +91 -0
- data/lib/generated/azure_mgmt_devtestlabs/models/user_secret_store.rb +55 -0
- data/lib/generated/azure_mgmt_devtestlabs/models/user_secret_store_fragment.rb +55 -0
- data/lib/generated/azure_mgmt_devtestlabs/models/virtual_machine_creation_source.rb +16 -0
- data/lib/generated/azure_mgmt_devtestlabs/models/virtual_network.rb +77 -59
- data/lib/generated/azure_mgmt_devtestlabs/models/virtual_network_fragment.rb +177 -0
- data/lib/generated/azure_mgmt_devtestlabs/models/week_details.rb +5 -3
- data/lib/generated/azure_mgmt_devtestlabs/models/week_details_fragment.rb +63 -0
- data/lib/generated/azure_mgmt_devtestlabs/models/windows_os_info.rb +4 -2
- data/lib/generated/azure_mgmt_devtestlabs/models/windows_os_state.rb +1 -1
- data/lib/generated/azure_mgmt_devtestlabs/module_definition.rb +1 -1
- data/lib/generated/azure_mgmt_devtestlabs/notification_channels.rb +764 -0
- data/lib/generated/azure_mgmt_devtestlabs/{policy_operations.rb → policies.rb} +82 -69
- data/lib/generated/azure_mgmt_devtestlabs/{policy_set.rb → policy_sets.rb} +18 -16
- data/lib/generated/azure_mgmt_devtestlabs/{virtual_machine.rb → schedules.rb} +282 -417
- data/lib/generated/azure_mgmt_devtestlabs/secrets.rb +573 -0
- data/lib/generated/azure_mgmt_devtestlabs/service_runners.rb +545 -0
- data/lib/generated/azure_mgmt_devtestlabs/users.rb +704 -0
- data/lib/generated/azure_mgmt_devtestlabs/version.rb +2 -2
- data/lib/generated/azure_mgmt_devtestlabs/{schedule_operations.rb → virtual_machine_schedules.rb} +132 -92
- data/lib/generated/azure_mgmt_devtestlabs/virtual_machines.rb +1669 -0
- data/lib/generated/azure_mgmt_devtestlabs/{virtual_network_operations.rb → virtual_networks.rb} +94 -81
- metadata +118 -24
- data/lib/generated/azure_mgmt_devtestlabs/cost_operations.rb +0 -121
- data/lib/generated/azure_mgmt_devtestlabs/models/subscription_notification.rb +0 -68
- data/lib/generated/azure_mgmt_devtestlabs/models/subscription_notification_state.rb +0 -20
@@ -1,18 +1,17 @@
|
|
1
1
|
# encoding: utf-8
|
2
|
-
# Code generated by Microsoft (R) AutoRest Code Generator 1.
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0
|
3
3
|
# Changes may cause incorrect behavior and will be lost if the code is
|
4
4
|
# regenerated.
|
5
5
|
|
6
6
|
module Azure::ARM::DevTestLabs
|
7
7
|
#
|
8
|
-
#
|
8
|
+
# The DevTest Labs Client.
|
9
9
|
#
|
10
|
-
class
|
11
|
-
include Azure::ARM::DevTestLabs::Models
|
10
|
+
class Schedules
|
12
11
|
include MsRestAzure
|
13
12
|
|
14
13
|
#
|
15
|
-
# Creates and initializes a new instance of the
|
14
|
+
# Creates and initializes a new instance of the Schedules class.
|
16
15
|
# @param client service class for accessing basic functionality.
|
17
16
|
#
|
18
17
|
def initialize(client)
|
@@ -23,60 +22,66 @@ module Azure::ARM::DevTestLabs
|
|
23
22
|
attr_reader :client
|
24
23
|
|
25
24
|
#
|
26
|
-
# List
|
25
|
+
# List schedules in a given lab.
|
27
26
|
#
|
28
27
|
# @param resource_group_name [String] The name of the resource group.
|
29
28
|
# @param lab_name [String] The name of the lab.
|
30
|
-
# @param
|
29
|
+
# @param expand [String] Specify the $expand query. Example:
|
30
|
+
# 'properties($select=status)'
|
31
|
+
# @param filter [String] The filter to apply to the operation.
|
31
32
|
# @param top [Integer] The maximum number of resources to return from the
|
32
33
|
# operation.
|
33
|
-
# @param
|
34
|
+
# @param orderby [String] The ordering expression for the results, using OData
|
34
35
|
# notation.
|
35
36
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
36
37
|
# will be added to the HTTP request.
|
37
38
|
#
|
38
|
-
# @return [Array<
|
39
|
+
# @return [Array<Schedule>] operation results.
|
39
40
|
#
|
40
|
-
def list(resource_group_name, lab_name, filter = nil, top = nil,
|
41
|
-
first_page = list_as_lazy(resource_group_name, lab_name, filter, top,
|
41
|
+
def list(resource_group_name, lab_name, expand = nil, filter = nil, top = nil, orderby = nil, custom_headers = nil)
|
42
|
+
first_page = list_as_lazy(resource_group_name, lab_name, expand, filter, top, orderby, custom_headers)
|
42
43
|
first_page.get_all_items
|
43
44
|
end
|
44
45
|
|
45
46
|
#
|
46
|
-
# List
|
47
|
+
# List schedules in a given lab.
|
47
48
|
#
|
48
49
|
# @param resource_group_name [String] The name of the resource group.
|
49
50
|
# @param lab_name [String] The name of the lab.
|
50
|
-
# @param
|
51
|
+
# @param expand [String] Specify the $expand query. Example:
|
52
|
+
# 'properties($select=status)'
|
53
|
+
# @param filter [String] The filter to apply to the operation.
|
51
54
|
# @param top [Integer] The maximum number of resources to return from the
|
52
55
|
# operation.
|
53
|
-
# @param
|
56
|
+
# @param orderby [String] The ordering expression for the results, using OData
|
54
57
|
# notation.
|
55
58
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
56
59
|
# will be added to the HTTP request.
|
57
60
|
#
|
58
61
|
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
59
62
|
#
|
60
|
-
def list_with_http_info(resource_group_name, lab_name, filter = nil, top = nil,
|
61
|
-
list_async(resource_group_name, lab_name, filter, top,
|
63
|
+
def list_with_http_info(resource_group_name, lab_name, expand = nil, filter = nil, top = nil, orderby = nil, custom_headers = nil)
|
64
|
+
list_async(resource_group_name, lab_name, expand, filter, top, orderby, custom_headers).value!
|
62
65
|
end
|
63
66
|
|
64
67
|
#
|
65
|
-
# List
|
68
|
+
# List schedules in a given lab.
|
66
69
|
#
|
67
70
|
# @param resource_group_name [String] The name of the resource group.
|
68
71
|
# @param lab_name [String] The name of the lab.
|
69
|
-
# @param
|
72
|
+
# @param expand [String] Specify the $expand query. Example:
|
73
|
+
# 'properties($select=status)'
|
74
|
+
# @param filter [String] The filter to apply to the operation.
|
70
75
|
# @param top [Integer] The maximum number of resources to return from the
|
71
76
|
# operation.
|
72
|
-
# @param
|
77
|
+
# @param orderby [String] The ordering expression for the results, using OData
|
73
78
|
# notation.
|
74
79
|
# @param [Hash{String => String}] A hash of custom headers that will be added
|
75
80
|
# to the HTTP request.
|
76
81
|
#
|
77
82
|
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
78
83
|
#
|
79
|
-
def list_async(resource_group_name, lab_name, filter = nil, top = nil,
|
84
|
+
def list_async(resource_group_name, lab_name, expand = nil, filter = nil, top = nil, orderby = nil, custom_headers = nil)
|
80
85
|
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
81
86
|
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
82
87
|
fail ArgumentError, 'lab_name is nil' if lab_name.nil?
|
@@ -88,14 +93,14 @@ module Azure::ARM::DevTestLabs
|
|
88
93
|
# Set Headers
|
89
94
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
90
95
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
91
|
-
path_template = '
|
96
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/schedules'
|
92
97
|
|
93
98
|
request_url = @base_url || @client.base_url
|
94
99
|
|
95
100
|
options = {
|
96
101
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
97
102
|
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'labName' => lab_name},
|
98
|
-
query_params: {'$filter' => filter,'$top' => top,'$
|
103
|
+
query_params: {'$expand' => expand,'$filter' => filter,'$top' => top,'$orderby' => orderby,'api-version' => @client.api_version},
|
99
104
|
headers: request_headers.merge(custom_headers || {}),
|
100
105
|
base_url: request_url
|
101
106
|
}
|
@@ -115,8 +120,8 @@ module Azure::ARM::DevTestLabs
|
|
115
120
|
if status_code == 200
|
116
121
|
begin
|
117
122
|
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
118
|
-
result_mapper =
|
119
|
-
result.body = @client.deserialize(result_mapper, parsed_response
|
123
|
+
result_mapper = Azure::ARM::DevTestLabs::Models::ResponseWithContinuationSchedule.mapper()
|
124
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
120
125
|
rescue Exception => e
|
121
126
|
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
122
127
|
end
|
@@ -129,48 +134,54 @@ module Azure::ARM::DevTestLabs
|
|
129
134
|
end
|
130
135
|
|
131
136
|
#
|
132
|
-
# Get
|
137
|
+
# Get schedule.
|
133
138
|
#
|
134
139
|
# @param resource_group_name [String] The name of the resource group.
|
135
140
|
# @param lab_name [String] The name of the lab.
|
136
|
-
# @param name [String] The name of the
|
141
|
+
# @param name [String] The name of the schedule.
|
142
|
+
# @param expand [String] Specify the $expand query. Example:
|
143
|
+
# 'properties($select=status)'
|
137
144
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
138
145
|
# will be added to the HTTP request.
|
139
146
|
#
|
140
|
-
# @return [
|
147
|
+
# @return [Schedule] operation results.
|
141
148
|
#
|
142
|
-
def
|
143
|
-
response =
|
149
|
+
def get(resource_group_name, lab_name, name, expand = nil, custom_headers = nil)
|
150
|
+
response = get_async(resource_group_name, lab_name, name, expand, custom_headers).value!
|
144
151
|
response.body unless response.nil?
|
145
152
|
end
|
146
153
|
|
147
154
|
#
|
148
|
-
# Get
|
155
|
+
# Get schedule.
|
149
156
|
#
|
150
157
|
# @param resource_group_name [String] The name of the resource group.
|
151
158
|
# @param lab_name [String] The name of the lab.
|
152
|
-
# @param name [String] The name of the
|
159
|
+
# @param name [String] The name of the schedule.
|
160
|
+
# @param expand [String] Specify the $expand query. Example:
|
161
|
+
# 'properties($select=status)'
|
153
162
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
154
163
|
# will be added to the HTTP request.
|
155
164
|
#
|
156
165
|
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
157
166
|
#
|
158
|
-
def
|
159
|
-
|
167
|
+
def get_with_http_info(resource_group_name, lab_name, name, expand = nil, custom_headers = nil)
|
168
|
+
get_async(resource_group_name, lab_name, name, expand, custom_headers).value!
|
160
169
|
end
|
161
170
|
|
162
171
|
#
|
163
|
-
# Get
|
172
|
+
# Get schedule.
|
164
173
|
#
|
165
174
|
# @param resource_group_name [String] The name of the resource group.
|
166
175
|
# @param lab_name [String] The name of the lab.
|
167
|
-
# @param name [String] The name of the
|
176
|
+
# @param name [String] The name of the schedule.
|
177
|
+
# @param expand [String] Specify the $expand query. Example:
|
178
|
+
# 'properties($select=status)'
|
168
179
|
# @param [Hash{String => String}] A hash of custom headers that will be added
|
169
180
|
# to the HTTP request.
|
170
181
|
#
|
171
182
|
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
172
183
|
#
|
173
|
-
def
|
184
|
+
def get_async(resource_group_name, lab_name, name, expand = nil, custom_headers = nil)
|
174
185
|
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
175
186
|
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
176
187
|
fail ArgumentError, 'lab_name is nil' if lab_name.nil?
|
@@ -183,14 +194,14 @@ module Azure::ARM::DevTestLabs
|
|
183
194
|
# Set Headers
|
184
195
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
185
196
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
186
|
-
path_template = '
|
197
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/schedules/{name}'
|
187
198
|
|
188
199
|
request_url = @base_url || @client.base_url
|
189
200
|
|
190
201
|
options = {
|
191
202
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
192
203
|
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'labName' => lab_name,'name' => name},
|
193
|
-
query_params: {'api-version' => @client.api_version},
|
204
|
+
query_params: {'$expand' => expand,'api-version' => @client.api_version},
|
194
205
|
headers: request_headers.merge(custom_headers || {}),
|
195
206
|
base_url: request_url
|
196
207
|
}
|
@@ -210,8 +221,8 @@ module Azure::ARM::DevTestLabs
|
|
210
221
|
if status_code == 200
|
211
222
|
begin
|
212
223
|
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
213
|
-
result_mapper =
|
214
|
-
result.body = @client.deserialize(result_mapper, parsed_response
|
224
|
+
result_mapper = Azure::ARM::DevTestLabs::Models::Schedule.mapper()
|
225
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
215
226
|
rescue Exception => e
|
216
227
|
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
217
228
|
end
|
@@ -224,143 +235,56 @@ module Azure::ARM::DevTestLabs
|
|
224
235
|
end
|
225
236
|
|
226
237
|
#
|
227
|
-
# Create or replace an existing
|
228
|
-
# while to complete.
|
229
|
-
#
|
230
|
-
# @param resource_group_name [String] The name of the resource group.
|
231
|
-
# @param lab_name [String] The name of the lab.
|
232
|
-
# @param name [String] The name of the virtual Machine.
|
233
|
-
# @param lab_virtual_machine [LabVirtualMachine]
|
234
|
-
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
235
|
-
# will be added to the HTTP request.
|
236
|
-
#
|
237
|
-
# @return [LabVirtualMachine] operation results.
|
238
|
-
#
|
239
|
-
def create_or_update_resource(resource_group_name, lab_name, name, lab_virtual_machine, custom_headers = nil)
|
240
|
-
response = create_or_update_resource_async(resource_group_name, lab_name, name, lab_virtual_machine, custom_headers).value!
|
241
|
-
response.body unless response.nil?
|
242
|
-
end
|
243
|
-
|
244
|
-
#
|
245
|
-
# @param resource_group_name [String] The name of the resource group.
|
246
|
-
# @param lab_name [String] The name of the lab.
|
247
|
-
# @param name [String] The name of the virtual Machine.
|
248
|
-
# @param lab_virtual_machine [LabVirtualMachine]
|
249
|
-
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
250
|
-
# will be added to the HTTP request.
|
251
|
-
#
|
252
|
-
# @return [Concurrent::Promise] promise which provides async access to http
|
253
|
-
# response.
|
254
|
-
#
|
255
|
-
def create_or_update_resource_async(resource_group_name, lab_name, name, lab_virtual_machine, custom_headers = nil)
|
256
|
-
# Send request
|
257
|
-
promise = begin_create_or_update_resource_async(resource_group_name, lab_name, name, lab_virtual_machine, custom_headers)
|
258
|
-
|
259
|
-
promise = promise.then do |response|
|
260
|
-
# Defining deserialization method.
|
261
|
-
deserialize_method = lambda do |parsed_response|
|
262
|
-
result_mapper = LabVirtualMachine.mapper()
|
263
|
-
parsed_response = @client.deserialize(result_mapper, parsed_response, 'parsed_response')
|
264
|
-
end
|
265
|
-
|
266
|
-
# Waiting for response.
|
267
|
-
@client.get_long_running_operation_result(response, deserialize_method)
|
268
|
-
end
|
269
|
-
|
270
|
-
promise
|
271
|
-
end
|
272
|
-
|
273
|
-
#
|
274
|
-
# Delete virtual machine. This operation can take a while to complete.
|
275
|
-
#
|
276
|
-
# @param resource_group_name [String] The name of the resource group.
|
277
|
-
# @param lab_name [String] The name of the lab.
|
278
|
-
# @param name [String] The name of the virtual Machine.
|
279
|
-
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
280
|
-
# will be added to the HTTP request.
|
281
|
-
#
|
282
|
-
def delete_resource(resource_group_name, lab_name, name, custom_headers = nil)
|
283
|
-
response = delete_resource_async(resource_group_name, lab_name, name, custom_headers).value!
|
284
|
-
nil
|
285
|
-
end
|
286
|
-
|
287
|
-
#
|
288
|
-
# @param resource_group_name [String] The name of the resource group.
|
289
|
-
# @param lab_name [String] The name of the lab.
|
290
|
-
# @param name [String] The name of the virtual Machine.
|
291
|
-
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
292
|
-
# will be added to the HTTP request.
|
293
|
-
#
|
294
|
-
# @return [Concurrent::Promise] promise which provides async access to http
|
295
|
-
# response.
|
296
|
-
#
|
297
|
-
def delete_resource_async(resource_group_name, lab_name, name, custom_headers = nil)
|
298
|
-
# Send request
|
299
|
-
promise = begin_delete_resource_async(resource_group_name, lab_name, name, custom_headers)
|
300
|
-
|
301
|
-
promise = promise.then do |response|
|
302
|
-
# Defining deserialization method.
|
303
|
-
deserialize_method = lambda do |parsed_response|
|
304
|
-
end
|
305
|
-
|
306
|
-
# Waiting for response.
|
307
|
-
@client.get_long_running_operation_result(response, deserialize_method)
|
308
|
-
end
|
309
|
-
|
310
|
-
promise
|
311
|
-
end
|
312
|
-
|
313
|
-
#
|
314
|
-
# Modify properties of virtual machines.
|
238
|
+
# Create or replace an existing schedule.
|
315
239
|
#
|
316
240
|
# @param resource_group_name [String] The name of the resource group.
|
317
241
|
# @param lab_name [String] The name of the lab.
|
318
|
-
# @param name [String] The name of the
|
319
|
-
# @param
|
242
|
+
# @param name [String] The name of the schedule.
|
243
|
+
# @param schedule [Schedule] A schedule.
|
320
244
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
321
245
|
# will be added to the HTTP request.
|
322
246
|
#
|
323
|
-
# @return [
|
247
|
+
# @return [Schedule] operation results.
|
324
248
|
#
|
325
|
-
def
|
326
|
-
response =
|
249
|
+
def create_or_update(resource_group_name, lab_name, name, schedule, custom_headers = nil)
|
250
|
+
response = create_or_update_async(resource_group_name, lab_name, name, schedule, custom_headers).value!
|
327
251
|
response.body unless response.nil?
|
328
252
|
end
|
329
253
|
|
330
254
|
#
|
331
|
-
#
|
255
|
+
# Create or replace an existing schedule.
|
332
256
|
#
|
333
257
|
# @param resource_group_name [String] The name of the resource group.
|
334
258
|
# @param lab_name [String] The name of the lab.
|
335
|
-
# @param name [String] The name of the
|
336
|
-
# @param
|
259
|
+
# @param name [String] The name of the schedule.
|
260
|
+
# @param schedule [Schedule] A schedule.
|
337
261
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
338
262
|
# will be added to the HTTP request.
|
339
263
|
#
|
340
264
|
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
341
265
|
#
|
342
|
-
def
|
343
|
-
|
266
|
+
def create_or_update_with_http_info(resource_group_name, lab_name, name, schedule, custom_headers = nil)
|
267
|
+
create_or_update_async(resource_group_name, lab_name, name, schedule, custom_headers).value!
|
344
268
|
end
|
345
269
|
|
346
270
|
#
|
347
|
-
#
|
271
|
+
# Create or replace an existing schedule.
|
348
272
|
#
|
349
273
|
# @param resource_group_name [String] The name of the resource group.
|
350
274
|
# @param lab_name [String] The name of the lab.
|
351
|
-
# @param name [String] The name of the
|
352
|
-
# @param
|
275
|
+
# @param name [String] The name of the schedule.
|
276
|
+
# @param schedule [Schedule] A schedule.
|
353
277
|
# @param [Hash{String => String}] A hash of custom headers that will be added
|
354
278
|
# to the HTTP request.
|
355
279
|
#
|
356
280
|
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
357
281
|
#
|
358
|
-
def
|
282
|
+
def create_or_update_async(resource_group_name, lab_name, name, schedule, custom_headers = nil)
|
359
283
|
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
360
284
|
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
361
285
|
fail ArgumentError, 'lab_name is nil' if lab_name.nil?
|
362
286
|
fail ArgumentError, 'name is nil' if name.nil?
|
363
|
-
fail ArgumentError, '
|
287
|
+
fail ArgumentError, 'schedule is nil' if schedule.nil?
|
364
288
|
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
365
289
|
|
366
290
|
|
@@ -373,11 +297,11 @@ module Azure::ARM::DevTestLabs
|
|
373
297
|
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
374
298
|
|
375
299
|
# Serialize Request
|
376
|
-
request_mapper =
|
377
|
-
request_content = @client.serialize(request_mapper,
|
300
|
+
request_mapper = Azure::ARM::DevTestLabs::Models::Schedule.mapper()
|
301
|
+
request_content = @client.serialize(request_mapper, schedule)
|
378
302
|
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
379
303
|
|
380
|
-
path_template = '
|
304
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/schedules/{name}'
|
381
305
|
|
382
306
|
request_url = @base_url || @client.base_url
|
383
307
|
|
@@ -389,13 +313,13 @@ module Azure::ARM::DevTestLabs
|
|
389
313
|
headers: request_headers.merge(custom_headers || {}),
|
390
314
|
base_url: request_url
|
391
315
|
}
|
392
|
-
promise = @client.make_request_async(:
|
316
|
+
promise = @client.make_request_async(:put, path_template, options)
|
393
317
|
|
394
318
|
promise = promise.then do |result|
|
395
319
|
http_response = result.response
|
396
320
|
status_code = http_response.status
|
397
321
|
response_content = http_response.body
|
398
|
-
unless status_code == 200
|
322
|
+
unless status_code == 200 || status_code == 201
|
399
323
|
error_model = JSON.load(response_content)
|
400
324
|
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
401
325
|
end
|
@@ -405,8 +329,18 @@ module Azure::ARM::DevTestLabs
|
|
405
329
|
if status_code == 200
|
406
330
|
begin
|
407
331
|
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
408
|
-
result_mapper =
|
409
|
-
result.body = @client.deserialize(result_mapper, parsed_response
|
332
|
+
result_mapper = Azure::ARM::DevTestLabs::Models::Schedule.mapper()
|
333
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
334
|
+
rescue Exception => e
|
335
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
336
|
+
end
|
337
|
+
end
|
338
|
+
# Deserialize Response
|
339
|
+
if status_code == 201
|
340
|
+
begin
|
341
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
342
|
+
result_mapper = Azure::ARM::DevTestLabs::Models::Schedule.mapper()
|
343
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
410
344
|
rescue Exception => e
|
411
345
|
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
412
346
|
end
|
@@ -419,181 +353,140 @@ module Azure::ARM::DevTestLabs
|
|
419
353
|
end
|
420
354
|
|
421
355
|
#
|
422
|
-
#
|
356
|
+
# Delete schedule.
|
423
357
|
#
|
424
358
|
# @param resource_group_name [String] The name of the resource group.
|
425
359
|
# @param lab_name [String] The name of the lab.
|
426
|
-
# @param name [String] The name of the
|
427
|
-
# @param apply_artifacts_request [ApplyArtifactsRequest]
|
360
|
+
# @param name [String] The name of the schedule.
|
428
361
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
429
362
|
# will be added to the HTTP request.
|
430
363
|
#
|
431
|
-
|
432
|
-
|
364
|
+
#
|
365
|
+
def delete(resource_group_name, lab_name, name, custom_headers = nil)
|
366
|
+
response = delete_async(resource_group_name, lab_name, name, custom_headers).value!
|
433
367
|
nil
|
434
368
|
end
|
435
369
|
|
370
|
+
#
|
371
|
+
# Delete schedule.
|
436
372
|
#
|
437
373
|
# @param resource_group_name [String] The name of the resource group.
|
438
374
|
# @param lab_name [String] The name of the lab.
|
439
|
-
# @param name [String] The name of the
|
440
|
-
# @param apply_artifacts_request [ApplyArtifactsRequest]
|
375
|
+
# @param name [String] The name of the schedule.
|
441
376
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
442
377
|
# will be added to the HTTP request.
|
443
378
|
#
|
444
|
-
# @return [
|
445
|
-
# response.
|
379
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
446
380
|
#
|
447
|
-
def
|
448
|
-
|
449
|
-
promise = begin_apply_artifacts_async(resource_group_name, lab_name, name, apply_artifacts_request, custom_headers)
|
450
|
-
|
451
|
-
promise = promise.then do |response|
|
452
|
-
# Defining deserialization method.
|
453
|
-
deserialize_method = lambda do |parsed_response|
|
454
|
-
end
|
455
|
-
|
456
|
-
# Waiting for response.
|
457
|
-
@client.get_long_running_operation_result(response, deserialize_method)
|
458
|
-
end
|
459
|
-
|
460
|
-
promise
|
381
|
+
def delete_with_http_info(resource_group_name, lab_name, name, custom_headers = nil)
|
382
|
+
delete_async(resource_group_name, lab_name, name, custom_headers).value!
|
461
383
|
end
|
462
384
|
|
463
385
|
#
|
464
|
-
#
|
386
|
+
# Delete schedule.
|
465
387
|
#
|
466
388
|
# @param resource_group_name [String] The name of the resource group.
|
467
389
|
# @param lab_name [String] The name of the lab.
|
468
|
-
# @param name [String] The name of the
|
469
|
-
# @param
|
470
|
-
#
|
471
|
-
#
|
472
|
-
def start(resource_group_name, lab_name, name, custom_headers = nil)
|
473
|
-
response = start_async(resource_group_name, lab_name, name, custom_headers).value!
|
474
|
-
nil
|
475
|
-
end
|
476
|
-
|
477
|
-
#
|
478
|
-
# @param resource_group_name [String] The name of the resource group.
|
479
|
-
# @param lab_name [String] The name of the lab.
|
480
|
-
# @param name [String] The name of the virtual Machine.
|
481
|
-
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
482
|
-
# will be added to the HTTP request.
|
390
|
+
# @param name [String] The name of the schedule.
|
391
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
392
|
+
# to the HTTP request.
|
483
393
|
#
|
484
|
-
# @return [Concurrent::Promise]
|
485
|
-
# response.
|
394
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
486
395
|
#
|
487
|
-
def
|
488
|
-
|
489
|
-
|
396
|
+
def delete_async(resource_group_name, lab_name, name, custom_headers = nil)
|
397
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
398
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
399
|
+
fail ArgumentError, 'lab_name is nil' if lab_name.nil?
|
400
|
+
fail ArgumentError, 'name is nil' if name.nil?
|
401
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
490
402
|
|
491
|
-
promise = promise.then do |response|
|
492
|
-
# Defining deserialization method.
|
493
|
-
deserialize_method = lambda do |parsed_response|
|
494
|
-
end
|
495
403
|
|
496
|
-
|
497
|
-
@client.get_long_running_operation_result(response, deserialize_method)
|
498
|
-
end
|
404
|
+
request_headers = {}
|
499
405
|
|
500
|
-
|
501
|
-
|
406
|
+
# Set Headers
|
407
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
408
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
409
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/schedules/{name}'
|
502
410
|
|
503
|
-
|
504
|
-
# Stop a Lab VM. This operation can take a while to complete.
|
505
|
-
#
|
506
|
-
# @param resource_group_name [String] The name of the resource group.
|
507
|
-
# @param lab_name [String] The name of the lab.
|
508
|
-
# @param name [String] The name of the virtual Machine.
|
509
|
-
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
510
|
-
# will be added to the HTTP request.
|
511
|
-
#
|
512
|
-
def stop(resource_group_name, lab_name, name, custom_headers = nil)
|
513
|
-
response = stop_async(resource_group_name, lab_name, name, custom_headers).value!
|
514
|
-
nil
|
515
|
-
end
|
411
|
+
request_url = @base_url || @client.base_url
|
516
412
|
|
517
|
-
|
518
|
-
|
519
|
-
|
520
|
-
|
521
|
-
|
522
|
-
|
523
|
-
|
524
|
-
|
525
|
-
# response.
|
526
|
-
#
|
527
|
-
def stop_async(resource_group_name, lab_name, name, custom_headers = nil)
|
528
|
-
# Send request
|
529
|
-
promise = begin_stop_async(resource_group_name, lab_name, name, custom_headers)
|
413
|
+
options = {
|
414
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
415
|
+
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'labName' => lab_name,'name' => name},
|
416
|
+
query_params: {'api-version' => @client.api_version},
|
417
|
+
headers: request_headers.merge(custom_headers || {}),
|
418
|
+
base_url: request_url
|
419
|
+
}
|
420
|
+
promise = @client.make_request_async(:delete, path_template, options)
|
530
421
|
|
531
|
-
promise = promise.then do |
|
532
|
-
|
533
|
-
|
422
|
+
promise = promise.then do |result|
|
423
|
+
http_response = result.response
|
424
|
+
status_code = http_response.status
|
425
|
+
response_content = http_response.body
|
426
|
+
unless status_code == 200 || status_code == 204
|
427
|
+
error_model = JSON.load(response_content)
|
428
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
534
429
|
end
|
535
430
|
|
536
|
-
|
537
|
-
|
431
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
432
|
+
|
433
|
+
result
|
538
434
|
end
|
539
435
|
|
540
|
-
promise
|
436
|
+
promise.execute
|
541
437
|
end
|
542
438
|
|
543
439
|
#
|
544
|
-
#
|
545
|
-
# while to complete.
|
440
|
+
# Modify properties of schedules.
|
546
441
|
#
|
547
442
|
# @param resource_group_name [String] The name of the resource group.
|
548
443
|
# @param lab_name [String] The name of the lab.
|
549
|
-
# @param name [String] The name of the
|
550
|
-
# @param
|
444
|
+
# @param name [String] The name of the schedule.
|
445
|
+
# @param schedule [ScheduleFragment] A schedule.
|
551
446
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
552
447
|
# will be added to the HTTP request.
|
553
448
|
#
|
554
|
-
# @return [
|
449
|
+
# @return [Schedule] operation results.
|
555
450
|
#
|
556
|
-
def
|
557
|
-
response =
|
451
|
+
def update(resource_group_name, lab_name, name, schedule, custom_headers = nil)
|
452
|
+
response = update_async(resource_group_name, lab_name, name, schedule, custom_headers).value!
|
558
453
|
response.body unless response.nil?
|
559
454
|
end
|
560
455
|
|
561
456
|
#
|
562
|
-
#
|
563
|
-
# while to complete.
|
457
|
+
# Modify properties of schedules.
|
564
458
|
#
|
565
459
|
# @param resource_group_name [String] The name of the resource group.
|
566
460
|
# @param lab_name [String] The name of the lab.
|
567
|
-
# @param name [String] The name of the
|
568
|
-
# @param
|
461
|
+
# @param name [String] The name of the schedule.
|
462
|
+
# @param schedule [ScheduleFragment] A schedule.
|
569
463
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
570
464
|
# will be added to the HTTP request.
|
571
465
|
#
|
572
466
|
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
573
467
|
#
|
574
|
-
def
|
575
|
-
|
468
|
+
def update_with_http_info(resource_group_name, lab_name, name, schedule, custom_headers = nil)
|
469
|
+
update_async(resource_group_name, lab_name, name, schedule, custom_headers).value!
|
576
470
|
end
|
577
471
|
|
578
472
|
#
|
579
|
-
#
|
580
|
-
# while to complete.
|
473
|
+
# Modify properties of schedules.
|
581
474
|
#
|
582
475
|
# @param resource_group_name [String] The name of the resource group.
|
583
476
|
# @param lab_name [String] The name of the lab.
|
584
|
-
# @param name [String] The name of the
|
585
|
-
# @param
|
477
|
+
# @param name [String] The name of the schedule.
|
478
|
+
# @param schedule [ScheduleFragment] A schedule.
|
586
479
|
# @param [Hash{String => String}] A hash of custom headers that will be added
|
587
480
|
# to the HTTP request.
|
588
481
|
#
|
589
482
|
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
590
483
|
#
|
591
|
-
def
|
484
|
+
def update_async(resource_group_name, lab_name, name, schedule, custom_headers = nil)
|
592
485
|
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
593
486
|
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
594
487
|
fail ArgumentError, 'lab_name is nil' if lab_name.nil?
|
595
488
|
fail ArgumentError, 'name is nil' if name.nil?
|
596
|
-
fail ArgumentError, '
|
489
|
+
fail ArgumentError, 'schedule is nil' if schedule.nil?
|
597
490
|
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
598
491
|
|
599
492
|
|
@@ -606,11 +499,11 @@ module Azure::ARM::DevTestLabs
|
|
606
499
|
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
607
500
|
|
608
501
|
# Serialize Request
|
609
|
-
request_mapper =
|
610
|
-
request_content = @client.serialize(request_mapper,
|
502
|
+
request_mapper = Azure::ARM::DevTestLabs::Models::ScheduleFragment.mapper()
|
503
|
+
request_content = @client.serialize(request_mapper, schedule)
|
611
504
|
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
612
505
|
|
613
|
-
path_template = '
|
506
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/schedules/{name}'
|
614
507
|
|
615
508
|
request_url = @base_url || @client.base_url
|
616
509
|
|
@@ -622,13 +515,13 @@ module Azure::ARM::DevTestLabs
|
|
622
515
|
headers: request_headers.merge(custom_headers || {}),
|
623
516
|
base_url: request_url
|
624
517
|
}
|
625
|
-
promise = @client.make_request_async(:
|
518
|
+
promise = @client.make_request_async(:patch, path_template, options)
|
626
519
|
|
627
520
|
promise = promise.then do |result|
|
628
521
|
http_response = result.response
|
629
522
|
status_code = http_response.status
|
630
523
|
response_content = http_response.body
|
631
|
-
unless status_code == 200
|
524
|
+
unless status_code == 200
|
632
525
|
error_model = JSON.load(response_content)
|
633
526
|
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
634
527
|
end
|
@@ -638,18 +531,8 @@ module Azure::ARM::DevTestLabs
|
|
638
531
|
if status_code == 200
|
639
532
|
begin
|
640
533
|
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
641
|
-
result_mapper =
|
642
|
-
result.body = @client.deserialize(result_mapper, parsed_response
|
643
|
-
rescue Exception => e
|
644
|
-
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
645
|
-
end
|
646
|
-
end
|
647
|
-
# Deserialize Response
|
648
|
-
if status_code == 201
|
649
|
-
begin
|
650
|
-
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
651
|
-
result_mapper = LabVirtualMachine.mapper()
|
652
|
-
result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
|
534
|
+
result_mapper = Azure::ARM::DevTestLabs::Models::Schedule.mapper()
|
535
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
653
536
|
rescue Exception => e
|
654
537
|
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
655
538
|
end
|
@@ -662,139 +545,92 @@ module Azure::ARM::DevTestLabs
|
|
662
545
|
end
|
663
546
|
|
664
547
|
#
|
665
|
-
#
|
548
|
+
# Execute a schedule. This operation can take a while to complete.
|
666
549
|
#
|
667
550
|
# @param resource_group_name [String] The name of the resource group.
|
668
551
|
# @param lab_name [String] The name of the lab.
|
669
|
-
# @param name [String] The name of the
|
552
|
+
# @param name [String] The name of the schedule.
|
670
553
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
671
554
|
# will be added to the HTTP request.
|
672
555
|
#
|
673
|
-
|
674
|
-
|
675
|
-
response = begin_delete_resource_async(resource_group_name, lab_name, name, custom_headers).value!
|
556
|
+
def execute(resource_group_name, lab_name, name, custom_headers = nil)
|
557
|
+
response = execute_async(resource_group_name, lab_name, name, custom_headers).value!
|
676
558
|
nil
|
677
559
|
end
|
678
560
|
|
679
|
-
#
|
680
|
-
# Delete virtual machine. This operation can take a while to complete.
|
681
561
|
#
|
682
562
|
# @param resource_group_name [String] The name of the resource group.
|
683
563
|
# @param lab_name [String] The name of the lab.
|
684
|
-
# @param name [String] The name of the
|
564
|
+
# @param name [String] The name of the schedule.
|
685
565
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
686
566
|
# will be added to the HTTP request.
|
687
567
|
#
|
688
|
-
# @return [
|
689
|
-
#
|
690
|
-
def begin_delete_resource_with_http_info(resource_group_name, lab_name, name, custom_headers = nil)
|
691
|
-
begin_delete_resource_async(resource_group_name, lab_name, name, custom_headers).value!
|
692
|
-
end
|
693
|
-
|
694
|
-
#
|
695
|
-
# Delete virtual machine. This operation can take a while to complete.
|
696
|
-
#
|
697
|
-
# @param resource_group_name [String] The name of the resource group.
|
698
|
-
# @param lab_name [String] The name of the lab.
|
699
|
-
# @param name [String] The name of the virtual Machine.
|
700
|
-
# @param [Hash{String => String}] A hash of custom headers that will be added
|
701
|
-
# to the HTTP request.
|
702
|
-
#
|
703
|
-
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
568
|
+
# @return [Concurrent::Promise] promise which provides async access to http
|
569
|
+
# response.
|
704
570
|
#
|
705
|
-
def
|
706
|
-
|
707
|
-
|
708
|
-
fail ArgumentError, 'lab_name is nil' if lab_name.nil?
|
709
|
-
fail ArgumentError, 'name is nil' if name.nil?
|
710
|
-
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
711
|
-
|
712
|
-
|
713
|
-
request_headers = {}
|
714
|
-
|
715
|
-
# Set Headers
|
716
|
-
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
717
|
-
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
718
|
-
path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/virtualmachines/{name}'
|
719
|
-
|
720
|
-
request_url = @base_url || @client.base_url
|
721
|
-
|
722
|
-
options = {
|
723
|
-
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
724
|
-
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'labName' => lab_name,'name' => name},
|
725
|
-
query_params: {'api-version' => @client.api_version},
|
726
|
-
headers: request_headers.merge(custom_headers || {}),
|
727
|
-
base_url: request_url
|
728
|
-
}
|
729
|
-
promise = @client.make_request_async(:delete, path_template, options)
|
571
|
+
def execute_async(resource_group_name, lab_name, name, custom_headers = nil)
|
572
|
+
# Send request
|
573
|
+
promise = begin_execute_async(resource_group_name, lab_name, name, custom_headers)
|
730
574
|
|
731
|
-
promise = promise.then do |
|
732
|
-
|
733
|
-
|
734
|
-
response_content = http_response.body
|
735
|
-
unless status_code == 202 || status_code == 204
|
736
|
-
error_model = JSON.load(response_content)
|
737
|
-
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
575
|
+
promise = promise.then do |response|
|
576
|
+
# Defining deserialization method.
|
577
|
+
deserialize_method = lambda do |parsed_response|
|
738
578
|
end
|
739
579
|
|
740
|
-
|
741
|
-
|
742
|
-
result
|
580
|
+
# Waiting for response.
|
581
|
+
@client.get_long_running_operation_result(response, deserialize_method)
|
743
582
|
end
|
744
583
|
|
745
|
-
promise
|
584
|
+
promise
|
746
585
|
end
|
747
586
|
|
748
587
|
#
|
749
|
-
#
|
588
|
+
# Lists all applicable schedules
|
750
589
|
#
|
751
590
|
# @param resource_group_name [String] The name of the resource group.
|
752
591
|
# @param lab_name [String] The name of the lab.
|
753
|
-
# @param name [String] The name of the
|
754
|
-
# @param apply_artifacts_request [ApplyArtifactsRequest]
|
592
|
+
# @param name [String] The name of the schedule.
|
755
593
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
756
594
|
# will be added to the HTTP request.
|
757
595
|
#
|
596
|
+
# @return [Array<Schedule>] operation results.
|
758
597
|
#
|
759
|
-
def
|
760
|
-
|
761
|
-
|
598
|
+
def list_applicable(resource_group_name, lab_name, name, custom_headers = nil)
|
599
|
+
first_page = list_applicable_as_lazy(resource_group_name, lab_name, name, custom_headers)
|
600
|
+
first_page.get_all_items
|
762
601
|
end
|
763
602
|
|
764
603
|
#
|
765
|
-
#
|
604
|
+
# Lists all applicable schedules
|
766
605
|
#
|
767
606
|
# @param resource_group_name [String] The name of the resource group.
|
768
607
|
# @param lab_name [String] The name of the lab.
|
769
|
-
# @param name [String] The name of the
|
770
|
-
# @param apply_artifacts_request [ApplyArtifactsRequest]
|
608
|
+
# @param name [String] The name of the schedule.
|
771
609
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
772
610
|
# will be added to the HTTP request.
|
773
611
|
#
|
774
612
|
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
775
613
|
#
|
776
|
-
def
|
777
|
-
|
614
|
+
def list_applicable_with_http_info(resource_group_name, lab_name, name, custom_headers = nil)
|
615
|
+
list_applicable_async(resource_group_name, lab_name, name, custom_headers).value!
|
778
616
|
end
|
779
617
|
|
780
618
|
#
|
781
|
-
#
|
619
|
+
# Lists all applicable schedules
|
782
620
|
#
|
783
621
|
# @param resource_group_name [String] The name of the resource group.
|
784
622
|
# @param lab_name [String] The name of the lab.
|
785
|
-
# @param name [String] The name of the
|
786
|
-
# @param apply_artifacts_request [ApplyArtifactsRequest]
|
623
|
+
# @param name [String] The name of the schedule.
|
787
624
|
# @param [Hash{String => String}] A hash of custom headers that will be added
|
788
625
|
# to the HTTP request.
|
789
626
|
#
|
790
627
|
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
791
628
|
#
|
792
|
-
def
|
629
|
+
def list_applicable_async(resource_group_name, lab_name, name, custom_headers = nil)
|
793
630
|
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
794
631
|
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
795
632
|
fail ArgumentError, 'lab_name is nil' if lab_name.nil?
|
796
633
|
fail ArgumentError, 'name is nil' if name.nil?
|
797
|
-
fail ArgumentError, 'apply_artifacts_request is nil' if apply_artifacts_request.nil?
|
798
634
|
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
799
635
|
|
800
636
|
|
@@ -803,15 +639,7 @@ module Azure::ARM::DevTestLabs
|
|
803
639
|
# Set Headers
|
804
640
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
805
641
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
806
|
-
|
807
|
-
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
808
|
-
|
809
|
-
# Serialize Request
|
810
|
-
request_mapper = ApplyArtifactsRequest.mapper()
|
811
|
-
request_content = @client.serialize(request_mapper, apply_artifacts_request, 'apply_artifacts_request')
|
812
|
-
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
813
|
-
|
814
|
-
path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/virtualmachines/{name}/applyArtifacts'
|
642
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/schedules/{name}/listApplicable'
|
815
643
|
|
816
644
|
request_url = @base_url || @client.base_url
|
817
645
|
|
@@ -819,7 +647,6 @@ module Azure::ARM::DevTestLabs
|
|
819
647
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
820
648
|
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'labName' => lab_name,'name' => name},
|
821
649
|
query_params: {'api-version' => @client.api_version},
|
822
|
-
body: request_content,
|
823
650
|
headers: request_headers.merge(custom_headers || {}),
|
824
651
|
base_url: request_url
|
825
652
|
}
|
@@ -829,12 +656,22 @@ module Azure::ARM::DevTestLabs
|
|
829
656
|
http_response = result.response
|
830
657
|
status_code = http_response.status
|
831
658
|
response_content = http_response.body
|
832
|
-
unless status_code == 200
|
659
|
+
unless status_code == 200
|
833
660
|
error_model = JSON.load(response_content)
|
834
661
|
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
835
662
|
end
|
836
663
|
|
837
664
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
665
|
+
# Deserialize Response
|
666
|
+
if status_code == 200
|
667
|
+
begin
|
668
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
669
|
+
result_mapper = Azure::ARM::DevTestLabs::Models::ResponseWithContinuationSchedule.mapper()
|
670
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
671
|
+
rescue Exception => e
|
672
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
673
|
+
end
|
674
|
+
end
|
838
675
|
|
839
676
|
result
|
840
677
|
end
|
@@ -843,47 +680,47 @@ module Azure::ARM::DevTestLabs
|
|
843
680
|
end
|
844
681
|
|
845
682
|
#
|
846
|
-
#
|
683
|
+
# Execute a schedule. This operation can take a while to complete.
|
847
684
|
#
|
848
685
|
# @param resource_group_name [String] The name of the resource group.
|
849
686
|
# @param lab_name [String] The name of the lab.
|
850
|
-
# @param name [String] The name of the
|
687
|
+
# @param name [String] The name of the schedule.
|
851
688
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
852
689
|
# will be added to the HTTP request.
|
853
690
|
#
|
854
691
|
#
|
855
|
-
def
|
856
|
-
response =
|
692
|
+
def begin_execute(resource_group_name, lab_name, name, custom_headers = nil)
|
693
|
+
response = begin_execute_async(resource_group_name, lab_name, name, custom_headers).value!
|
857
694
|
nil
|
858
695
|
end
|
859
696
|
|
860
697
|
#
|
861
|
-
#
|
698
|
+
# Execute a schedule. This operation can take a while to complete.
|
862
699
|
#
|
863
700
|
# @param resource_group_name [String] The name of the resource group.
|
864
701
|
# @param lab_name [String] The name of the lab.
|
865
|
-
# @param name [String] The name of the
|
702
|
+
# @param name [String] The name of the schedule.
|
866
703
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
867
704
|
# will be added to the HTTP request.
|
868
705
|
#
|
869
706
|
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
870
707
|
#
|
871
|
-
def
|
872
|
-
|
708
|
+
def begin_execute_with_http_info(resource_group_name, lab_name, name, custom_headers = nil)
|
709
|
+
begin_execute_async(resource_group_name, lab_name, name, custom_headers).value!
|
873
710
|
end
|
874
711
|
|
875
712
|
#
|
876
|
-
#
|
713
|
+
# Execute a schedule. This operation can take a while to complete.
|
877
714
|
#
|
878
715
|
# @param resource_group_name [String] The name of the resource group.
|
879
716
|
# @param lab_name [String] The name of the lab.
|
880
|
-
# @param name [String] The name of the
|
717
|
+
# @param name [String] The name of the schedule.
|
881
718
|
# @param [Hash{String => String}] A hash of custom headers that will be added
|
882
719
|
# to the HTTP request.
|
883
720
|
#
|
884
721
|
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
885
722
|
#
|
886
|
-
def
|
723
|
+
def begin_execute_async(resource_group_name, lab_name, name, custom_headers = nil)
|
887
724
|
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
888
725
|
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
889
726
|
fail ArgumentError, 'lab_name is nil' if lab_name.nil?
|
@@ -896,7 +733,7 @@ module Azure::ARM::DevTestLabs
|
|
896
733
|
# Set Headers
|
897
734
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
898
735
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
899
|
-
path_template = '
|
736
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/schedules/{name}/execute'
|
900
737
|
|
901
738
|
request_url = @base_url || @client.base_url
|
902
739
|
|
@@ -927,52 +764,46 @@ module Azure::ARM::DevTestLabs
|
|
927
764
|
end
|
928
765
|
|
929
766
|
#
|
930
|
-
#
|
767
|
+
# List schedules in a given lab.
|
931
768
|
#
|
932
|
-
# @param
|
933
|
-
#
|
934
|
-
# @param name [String] The name of the virtual Machine.
|
769
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
770
|
+
# to List operation.
|
935
771
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
936
772
|
# will be added to the HTTP request.
|
937
773
|
#
|
774
|
+
# @return [ResponseWithContinuationSchedule] operation results.
|
938
775
|
#
|
939
|
-
def
|
940
|
-
response =
|
941
|
-
nil
|
776
|
+
def list_next(next_page_link, custom_headers = nil)
|
777
|
+
response = list_next_async(next_page_link, custom_headers).value!
|
778
|
+
response.body unless response.nil?
|
942
779
|
end
|
943
780
|
|
944
781
|
#
|
945
|
-
#
|
782
|
+
# List schedules in a given lab.
|
946
783
|
#
|
947
|
-
# @param
|
948
|
-
#
|
949
|
-
# @param name [String] The name of the virtual Machine.
|
784
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
785
|
+
# to List operation.
|
950
786
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
951
787
|
# will be added to the HTTP request.
|
952
788
|
#
|
953
789
|
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
954
790
|
#
|
955
|
-
def
|
956
|
-
|
791
|
+
def list_next_with_http_info(next_page_link, custom_headers = nil)
|
792
|
+
list_next_async(next_page_link, custom_headers).value!
|
957
793
|
end
|
958
794
|
|
959
795
|
#
|
960
|
-
#
|
796
|
+
# List schedules in a given lab.
|
961
797
|
#
|
962
|
-
# @param
|
963
|
-
#
|
964
|
-
# @param name [String] The name of the virtual Machine.
|
798
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
799
|
+
# to List operation.
|
965
800
|
# @param [Hash{String => String}] A hash of custom headers that will be added
|
966
801
|
# to the HTTP request.
|
967
802
|
#
|
968
803
|
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
969
804
|
#
|
970
|
-
def
|
971
|
-
fail ArgumentError, '
|
972
|
-
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
973
|
-
fail ArgumentError, 'lab_name is nil' if lab_name.nil?
|
974
|
-
fail ArgumentError, 'name is nil' if name.nil?
|
975
|
-
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
805
|
+
def list_next_async(next_page_link, custom_headers = nil)
|
806
|
+
fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
|
976
807
|
|
977
808
|
|
978
809
|
request_headers = {}
|
@@ -980,29 +811,38 @@ module Azure::ARM::DevTestLabs
|
|
980
811
|
# Set Headers
|
981
812
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
982
813
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
983
|
-
path_template = '
|
814
|
+
path_template = '{nextLink}'
|
984
815
|
|
985
816
|
request_url = @base_url || @client.base_url
|
986
817
|
|
987
818
|
options = {
|
988
819
|
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
989
|
-
|
990
|
-
query_params: {'api-version' => @client.api_version},
|
820
|
+
skip_encoding_path_params: {'nextLink' => next_page_link},
|
991
821
|
headers: request_headers.merge(custom_headers || {}),
|
992
822
|
base_url: request_url
|
993
823
|
}
|
994
|
-
promise = @client.make_request_async(:
|
824
|
+
promise = @client.make_request_async(:get, path_template, options)
|
995
825
|
|
996
826
|
promise = promise.then do |result|
|
997
827
|
http_response = result.response
|
998
828
|
status_code = http_response.status
|
999
829
|
response_content = http_response.body
|
1000
|
-
unless status_code == 200
|
830
|
+
unless status_code == 200
|
1001
831
|
error_model = JSON.load(response_content)
|
1002
832
|
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
1003
833
|
end
|
1004
834
|
|
1005
835
|
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
836
|
+
# Deserialize Response
|
837
|
+
if status_code == 200
|
838
|
+
begin
|
839
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
840
|
+
result_mapper = Azure::ARM::DevTestLabs::Models::ResponseWithContinuationSchedule.mapper()
|
841
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
842
|
+
rescue Exception => e
|
843
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
844
|
+
end
|
845
|
+
end
|
1006
846
|
|
1007
847
|
result
|
1008
848
|
end
|
@@ -1011,22 +851,22 @@ module Azure::ARM::DevTestLabs
|
|
1011
851
|
end
|
1012
852
|
|
1013
853
|
#
|
1014
|
-
#
|
854
|
+
# Lists all applicable schedules
|
1015
855
|
#
|
1016
856
|
# @param next_page_link [String] The NextLink from the previous successful call
|
1017
857
|
# to List operation.
|
1018
858
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1019
859
|
# will be added to the HTTP request.
|
1020
860
|
#
|
1021
|
-
# @return [
|
861
|
+
# @return [ResponseWithContinuationSchedule] operation results.
|
1022
862
|
#
|
1023
|
-
def
|
1024
|
-
response =
|
863
|
+
def list_applicable_next(next_page_link, custom_headers = nil)
|
864
|
+
response = list_applicable_next_async(next_page_link, custom_headers).value!
|
1025
865
|
response.body unless response.nil?
|
1026
866
|
end
|
1027
867
|
|
1028
868
|
#
|
1029
|
-
#
|
869
|
+
# Lists all applicable schedules
|
1030
870
|
#
|
1031
871
|
# @param next_page_link [String] The NextLink from the previous successful call
|
1032
872
|
# to List operation.
|
@@ -1035,12 +875,12 @@ module Azure::ARM::DevTestLabs
|
|
1035
875
|
#
|
1036
876
|
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
1037
877
|
#
|
1038
|
-
def
|
1039
|
-
|
878
|
+
def list_applicable_next_with_http_info(next_page_link, custom_headers = nil)
|
879
|
+
list_applicable_next_async(next_page_link, custom_headers).value!
|
1040
880
|
end
|
1041
881
|
|
1042
882
|
#
|
1043
|
-
#
|
883
|
+
# Lists all applicable schedules
|
1044
884
|
#
|
1045
885
|
# @param next_page_link [String] The NextLink from the previous successful call
|
1046
886
|
# to List operation.
|
@@ -1049,7 +889,7 @@ module Azure::ARM::DevTestLabs
|
|
1049
889
|
#
|
1050
890
|
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
1051
891
|
#
|
1052
|
-
def
|
892
|
+
def list_applicable_next_async(next_page_link, custom_headers = nil)
|
1053
893
|
fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
|
1054
894
|
|
1055
895
|
|
@@ -1068,7 +908,7 @@ module Azure::ARM::DevTestLabs
|
|
1068
908
|
headers: request_headers.merge(custom_headers || {}),
|
1069
909
|
base_url: request_url
|
1070
910
|
}
|
1071
|
-
promise = @client.make_request_async(:
|
911
|
+
promise = @client.make_request_async(:post, path_template, options)
|
1072
912
|
|
1073
913
|
promise = promise.then do |result|
|
1074
914
|
http_response = result.response
|
@@ -1084,8 +924,8 @@ module Azure::ARM::DevTestLabs
|
|
1084
924
|
if status_code == 200
|
1085
925
|
begin
|
1086
926
|
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
1087
|
-
result_mapper =
|
1088
|
-
result.body = @client.deserialize(result_mapper, parsed_response
|
927
|
+
result_mapper = Azure::ARM::DevTestLabs::Models::ResponseWithContinuationSchedule.mapper()
|
928
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
1089
929
|
rescue Exception => e
|
1090
930
|
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
1091
931
|
end
|
@@ -1098,23 +938,25 @@ module Azure::ARM::DevTestLabs
|
|
1098
938
|
end
|
1099
939
|
|
1100
940
|
#
|
1101
|
-
# List
|
941
|
+
# List schedules in a given lab.
|
1102
942
|
#
|
1103
943
|
# @param resource_group_name [String] The name of the resource group.
|
1104
944
|
# @param lab_name [String] The name of the lab.
|
1105
|
-
# @param
|
945
|
+
# @param expand [String] Specify the $expand query. Example:
|
946
|
+
# 'properties($select=status)'
|
947
|
+
# @param filter [String] The filter to apply to the operation.
|
1106
948
|
# @param top [Integer] The maximum number of resources to return from the
|
1107
949
|
# operation.
|
1108
|
-
# @param
|
950
|
+
# @param orderby [String] The ordering expression for the results, using OData
|
1109
951
|
# notation.
|
1110
952
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1111
953
|
# will be added to the HTTP request.
|
1112
954
|
#
|
1113
|
-
# @return [
|
1114
|
-
#
|
955
|
+
# @return [ResponseWithContinuationSchedule] which provide lazy access to pages
|
956
|
+
# of the response.
|
1115
957
|
#
|
1116
|
-
def list_as_lazy(resource_group_name, lab_name, filter = nil, top = nil,
|
1117
|
-
response = list_async(resource_group_name, lab_name, filter, top,
|
958
|
+
def list_as_lazy(resource_group_name, lab_name, expand = nil, filter = nil, top = nil, orderby = nil, custom_headers = nil)
|
959
|
+
response = list_async(resource_group_name, lab_name, expand, filter, top, orderby, custom_headers).value!
|
1118
960
|
unless response.nil?
|
1119
961
|
page = response.body
|
1120
962
|
page.next_method = Proc.new do |next_page_link|
|
@@ -1124,5 +966,28 @@ module Azure::ARM::DevTestLabs
|
|
1124
966
|
end
|
1125
967
|
end
|
1126
968
|
|
969
|
+
#
|
970
|
+
# Lists all applicable schedules
|
971
|
+
#
|
972
|
+
# @param resource_group_name [String] The name of the resource group.
|
973
|
+
# @param lab_name [String] The name of the lab.
|
974
|
+
# @param name [String] The name of the schedule.
|
975
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
976
|
+
# will be added to the HTTP request.
|
977
|
+
#
|
978
|
+
# @return [ResponseWithContinuationSchedule] which provide lazy access to pages
|
979
|
+
# of the response.
|
980
|
+
#
|
981
|
+
def list_applicable_as_lazy(resource_group_name, lab_name, name, custom_headers = nil)
|
982
|
+
response = list_applicable_async(resource_group_name, lab_name, name, custom_headers).value!
|
983
|
+
unless response.nil?
|
984
|
+
page = response.body
|
985
|
+
page.next_method = Proc.new do |next_page_link|
|
986
|
+
list_applicable_next_async(next_page_link, custom_headers)
|
987
|
+
end
|
988
|
+
page
|
989
|
+
end
|
990
|
+
end
|
991
|
+
|
1127
992
|
end
|
1128
993
|
end
|