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
@@ -0,0 +1,244 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator 1.2.2.0
|
3
|
+
# Changes may cause incorrect behavior and will be lost if the code is
|
4
|
+
# regenerated.
|
5
|
+
|
6
|
+
module Azure::ARM::DevTestLabs
|
7
|
+
#
|
8
|
+
# The DevTest Labs Client.
|
9
|
+
#
|
10
|
+
class Costs
|
11
|
+
include MsRestAzure
|
12
|
+
|
13
|
+
#
|
14
|
+
# Creates and initializes a new instance of the Costs class.
|
15
|
+
# @param client service class for accessing basic functionality.
|
16
|
+
#
|
17
|
+
def initialize(client)
|
18
|
+
@client = client
|
19
|
+
end
|
20
|
+
|
21
|
+
# @return [DevTestLabsClient] reference to the DevTestLabsClient
|
22
|
+
attr_reader :client
|
23
|
+
|
24
|
+
#
|
25
|
+
# Get cost.
|
26
|
+
#
|
27
|
+
# @param resource_group_name [String] The name of the resource group.
|
28
|
+
# @param lab_name [String] The name of the lab.
|
29
|
+
# @param name [String] The name of the cost.
|
30
|
+
# @param expand [String] Specify the $expand query. Example:
|
31
|
+
# 'properties($expand=labCostDetails)'
|
32
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
33
|
+
# will be added to the HTTP request.
|
34
|
+
#
|
35
|
+
# @return [LabCost] operation results.
|
36
|
+
#
|
37
|
+
def get(resource_group_name, lab_name, name, expand = nil, custom_headers = nil)
|
38
|
+
response = get_async(resource_group_name, lab_name, name, expand, custom_headers).value!
|
39
|
+
response.body unless response.nil?
|
40
|
+
end
|
41
|
+
|
42
|
+
#
|
43
|
+
# Get cost.
|
44
|
+
#
|
45
|
+
# @param resource_group_name [String] The name of the resource group.
|
46
|
+
# @param lab_name [String] The name of the lab.
|
47
|
+
# @param name [String] The name of the cost.
|
48
|
+
# @param expand [String] Specify the $expand query. Example:
|
49
|
+
# 'properties($expand=labCostDetails)'
|
50
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
51
|
+
# will be added to the HTTP request.
|
52
|
+
#
|
53
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
54
|
+
#
|
55
|
+
def get_with_http_info(resource_group_name, lab_name, name, expand = nil, custom_headers = nil)
|
56
|
+
get_async(resource_group_name, lab_name, name, expand, custom_headers).value!
|
57
|
+
end
|
58
|
+
|
59
|
+
#
|
60
|
+
# Get cost.
|
61
|
+
#
|
62
|
+
# @param resource_group_name [String] The name of the resource group.
|
63
|
+
# @param lab_name [String] The name of the lab.
|
64
|
+
# @param name [String] The name of the cost.
|
65
|
+
# @param expand [String] Specify the $expand query. Example:
|
66
|
+
# 'properties($expand=labCostDetails)'
|
67
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
68
|
+
# to the HTTP request.
|
69
|
+
#
|
70
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
71
|
+
#
|
72
|
+
def get_async(resource_group_name, lab_name, name, expand = nil, custom_headers = nil)
|
73
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
74
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
75
|
+
fail ArgumentError, 'lab_name is nil' if lab_name.nil?
|
76
|
+
fail ArgumentError, 'name is nil' if name.nil?
|
77
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
78
|
+
|
79
|
+
|
80
|
+
request_headers = {}
|
81
|
+
|
82
|
+
# Set Headers
|
83
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
84
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
85
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/costs/{name}'
|
86
|
+
|
87
|
+
request_url = @base_url || @client.base_url
|
88
|
+
|
89
|
+
options = {
|
90
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
91
|
+
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'labName' => lab_name,'name' => name},
|
92
|
+
query_params: {'$expand' => expand,'api-version' => @client.api_version},
|
93
|
+
headers: request_headers.merge(custom_headers || {}),
|
94
|
+
base_url: request_url
|
95
|
+
}
|
96
|
+
promise = @client.make_request_async(:get, path_template, options)
|
97
|
+
|
98
|
+
promise = promise.then do |result|
|
99
|
+
http_response = result.response
|
100
|
+
status_code = http_response.status
|
101
|
+
response_content = http_response.body
|
102
|
+
unless status_code == 200
|
103
|
+
error_model = JSON.load(response_content)
|
104
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
105
|
+
end
|
106
|
+
|
107
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
108
|
+
# Deserialize Response
|
109
|
+
if status_code == 200
|
110
|
+
begin
|
111
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
112
|
+
result_mapper = Azure::ARM::DevTestLabs::Models::LabCost.mapper()
|
113
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
114
|
+
rescue Exception => e
|
115
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
116
|
+
end
|
117
|
+
end
|
118
|
+
|
119
|
+
result
|
120
|
+
end
|
121
|
+
|
122
|
+
promise.execute
|
123
|
+
end
|
124
|
+
|
125
|
+
#
|
126
|
+
# Create or replace an existing cost.
|
127
|
+
#
|
128
|
+
# @param resource_group_name [String] The name of the resource group.
|
129
|
+
# @param lab_name [String] The name of the lab.
|
130
|
+
# @param name [String] The name of the cost.
|
131
|
+
# @param lab_cost [LabCost] A cost item.
|
132
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
133
|
+
# will be added to the HTTP request.
|
134
|
+
#
|
135
|
+
# @return [LabCost] operation results.
|
136
|
+
#
|
137
|
+
def create_or_update(resource_group_name, lab_name, name, lab_cost, custom_headers = nil)
|
138
|
+
response = create_or_update_async(resource_group_name, lab_name, name, lab_cost, custom_headers).value!
|
139
|
+
response.body unless response.nil?
|
140
|
+
end
|
141
|
+
|
142
|
+
#
|
143
|
+
# Create or replace an existing cost.
|
144
|
+
#
|
145
|
+
# @param resource_group_name [String] The name of the resource group.
|
146
|
+
# @param lab_name [String] The name of the lab.
|
147
|
+
# @param name [String] The name of the cost.
|
148
|
+
# @param lab_cost [LabCost] A cost item.
|
149
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
150
|
+
# will be added to the HTTP request.
|
151
|
+
#
|
152
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
153
|
+
#
|
154
|
+
def create_or_update_with_http_info(resource_group_name, lab_name, name, lab_cost, custom_headers = nil)
|
155
|
+
create_or_update_async(resource_group_name, lab_name, name, lab_cost, custom_headers).value!
|
156
|
+
end
|
157
|
+
|
158
|
+
#
|
159
|
+
# Create or replace an existing cost.
|
160
|
+
#
|
161
|
+
# @param resource_group_name [String] The name of the resource group.
|
162
|
+
# @param lab_name [String] The name of the lab.
|
163
|
+
# @param name [String] The name of the cost.
|
164
|
+
# @param lab_cost [LabCost] A cost item.
|
165
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
166
|
+
# to the HTTP request.
|
167
|
+
#
|
168
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
169
|
+
#
|
170
|
+
def create_or_update_async(resource_group_name, lab_name, name, lab_cost, custom_headers = nil)
|
171
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
172
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
173
|
+
fail ArgumentError, 'lab_name is nil' if lab_name.nil?
|
174
|
+
fail ArgumentError, 'name is nil' if name.nil?
|
175
|
+
fail ArgumentError, 'lab_cost is nil' if lab_cost.nil?
|
176
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
177
|
+
|
178
|
+
|
179
|
+
request_headers = {}
|
180
|
+
|
181
|
+
# Set Headers
|
182
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
183
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
184
|
+
|
185
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
186
|
+
|
187
|
+
# Serialize Request
|
188
|
+
request_mapper = Azure::ARM::DevTestLabs::Models::LabCost.mapper()
|
189
|
+
request_content = @client.serialize(request_mapper, lab_cost)
|
190
|
+
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
191
|
+
|
192
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/costs/{name}'
|
193
|
+
|
194
|
+
request_url = @base_url || @client.base_url
|
195
|
+
|
196
|
+
options = {
|
197
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
198
|
+
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'labName' => lab_name,'name' => name},
|
199
|
+
query_params: {'api-version' => @client.api_version},
|
200
|
+
body: request_content,
|
201
|
+
headers: request_headers.merge(custom_headers || {}),
|
202
|
+
base_url: request_url
|
203
|
+
}
|
204
|
+
promise = @client.make_request_async(:put, path_template, options)
|
205
|
+
|
206
|
+
promise = promise.then do |result|
|
207
|
+
http_response = result.response
|
208
|
+
status_code = http_response.status
|
209
|
+
response_content = http_response.body
|
210
|
+
unless status_code == 200 || status_code == 201
|
211
|
+
error_model = JSON.load(response_content)
|
212
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
213
|
+
end
|
214
|
+
|
215
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
216
|
+
# Deserialize Response
|
217
|
+
if status_code == 200
|
218
|
+
begin
|
219
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
220
|
+
result_mapper = Azure::ARM::DevTestLabs::Models::LabCost.mapper()
|
221
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
222
|
+
rescue Exception => e
|
223
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
224
|
+
end
|
225
|
+
end
|
226
|
+
# Deserialize Response
|
227
|
+
if status_code == 201
|
228
|
+
begin
|
229
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
230
|
+
result_mapper = Azure::ARM::DevTestLabs::Models::LabCost.mapper()
|
231
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
232
|
+
rescue Exception => e
|
233
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
234
|
+
end
|
235
|
+
end
|
236
|
+
|
237
|
+
result
|
238
|
+
end
|
239
|
+
|
240
|
+
promise.execute
|
241
|
+
end
|
242
|
+
|
243
|
+
end
|
244
|
+
end
|
@@ -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 CustomImages
|
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 CustomImages class.
|
16
15
|
# @param client service class for accessing basic functionality.
|
17
16
|
#
|
18
17
|
def initialize(client)
|
@@ -27,18 +26,20 @@ module Azure::ARM::DevTestLabs
|
|
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=vm)'
|
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
39
|
# @return [Array<CustomImage>] 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
|
|
@@ -47,18 +48,20 @@ module Azure::ARM::DevTestLabs
|
|
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=vm)'
|
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
|
#
|
@@ -66,17 +69,19 @@ module Azure::ARM::DevTestLabs
|
|
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=vm)'
|
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}/customimages'
|
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 = ResponseWithContinuationCustomImage.mapper()
|
119
|
-
result.body = @client.deserialize(result_mapper, parsed_response
|
123
|
+
result_mapper = Azure::ARM::DevTestLabs::Models::ResponseWithContinuationCustomImage.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
|
@@ -134,13 +139,15 @@ module Azure::ARM::DevTestLabs
|
|
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
141
|
# @param name [String] The name of the custom image.
|
142
|
+
# @param expand [String] Specify the $expand query. Example:
|
143
|
+
# 'properties($select=vm)'
|
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
147
|
# @return [CustomImage] 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
|
|
@@ -150,13 +157,15 @@ module Azure::ARM::DevTestLabs
|
|
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
159
|
# @param name [String] The name of the custom image.
|
160
|
+
# @param expand [String] Specify the $expand query. Example:
|
161
|
+
# 'properties($select=vm)'
|
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
|
#
|
@@ -165,12 +174,14 @@ module Azure::ARM::DevTestLabs
|
|
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
176
|
# @param name [String] The name of the custom image.
|
177
|
+
# @param expand [String] Specify the $expand query. Example:
|
178
|
+
# 'properties($select=vm)'
|
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}/customimages/{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 = CustomImage.mapper()
|
214
|
-
result.body = @client.deserialize(result_mapper, parsed_response
|
224
|
+
result_mapper = Azure::ARM::DevTestLabs::Models::CustomImage.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
|
@@ -230,14 +241,14 @@ module Azure::ARM::DevTestLabs
|
|
230
241
|
# @param resource_group_name [String] The name of the resource group.
|
231
242
|
# @param lab_name [String] The name of the lab.
|
232
243
|
# @param name [String] The name of the custom image.
|
233
|
-
# @param custom_image [CustomImage]
|
244
|
+
# @param custom_image [CustomImage] A custom image.
|
234
245
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
235
246
|
# will be added to the HTTP request.
|
236
247
|
#
|
237
248
|
# @return [CustomImage] operation results.
|
238
249
|
#
|
239
|
-
def
|
240
|
-
response =
|
250
|
+
def create_or_update(resource_group_name, lab_name, name, custom_image, custom_headers = nil)
|
251
|
+
response = create_or_update_async(resource_group_name, lab_name, name, custom_image, custom_headers).value!
|
241
252
|
response.body unless response.nil?
|
242
253
|
end
|
243
254
|
|
@@ -245,22 +256,22 @@ module Azure::ARM::DevTestLabs
|
|
245
256
|
# @param resource_group_name [String] The name of the resource group.
|
246
257
|
# @param lab_name [String] The name of the lab.
|
247
258
|
# @param name [String] The name of the custom image.
|
248
|
-
# @param custom_image [CustomImage]
|
259
|
+
# @param custom_image [CustomImage] A custom image.
|
249
260
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
250
261
|
# will be added to the HTTP request.
|
251
262
|
#
|
252
263
|
# @return [Concurrent::Promise] promise which provides async access to http
|
253
264
|
# response.
|
254
265
|
#
|
255
|
-
def
|
266
|
+
def create_or_update_async(resource_group_name, lab_name, name, custom_image, custom_headers = nil)
|
256
267
|
# Send request
|
257
|
-
promise =
|
268
|
+
promise = begin_create_or_update_async(resource_group_name, lab_name, name, custom_image, custom_headers)
|
258
269
|
|
259
270
|
promise = promise.then do |response|
|
260
271
|
# Defining deserialization method.
|
261
272
|
deserialize_method = lambda do |parsed_response|
|
262
|
-
result_mapper = CustomImage.mapper()
|
263
|
-
parsed_response = @client.deserialize(result_mapper, parsed_response
|
273
|
+
result_mapper = Azure::ARM::DevTestLabs::Models::CustomImage.mapper()
|
274
|
+
parsed_response = @client.deserialize(result_mapper, parsed_response)
|
264
275
|
end
|
265
276
|
|
266
277
|
# Waiting for response.
|
@@ -279,8 +290,8 @@ module Azure::ARM::DevTestLabs
|
|
279
290
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
280
291
|
# will be added to the HTTP request.
|
281
292
|
#
|
282
|
-
def
|
283
|
-
response =
|
293
|
+
def delete(resource_group_name, lab_name, name, custom_headers = nil)
|
294
|
+
response = delete_async(resource_group_name, lab_name, name, custom_headers).value!
|
284
295
|
nil
|
285
296
|
end
|
286
297
|
|
@@ -294,9 +305,9 @@ module Azure::ARM::DevTestLabs
|
|
294
305
|
# @return [Concurrent::Promise] promise which provides async access to http
|
295
306
|
# response.
|
296
307
|
#
|
297
|
-
def
|
308
|
+
def delete_async(resource_group_name, lab_name, name, custom_headers = nil)
|
298
309
|
# Send request
|
299
|
-
promise =
|
310
|
+
promise = begin_delete_async(resource_group_name, lab_name, name, custom_headers)
|
300
311
|
|
301
312
|
promise = promise.then do |response|
|
302
313
|
# Defining deserialization method.
|
@@ -317,14 +328,14 @@ module Azure::ARM::DevTestLabs
|
|
317
328
|
# @param resource_group_name [String] The name of the resource group.
|
318
329
|
# @param lab_name [String] The name of the lab.
|
319
330
|
# @param name [String] The name of the custom image.
|
320
|
-
# @param custom_image [CustomImage]
|
331
|
+
# @param custom_image [CustomImage] A custom image.
|
321
332
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
322
333
|
# will be added to the HTTP request.
|
323
334
|
#
|
324
335
|
# @return [CustomImage] operation results.
|
325
336
|
#
|
326
|
-
def
|
327
|
-
response =
|
337
|
+
def begin_create_or_update(resource_group_name, lab_name, name, custom_image, custom_headers = nil)
|
338
|
+
response = begin_create_or_update_async(resource_group_name, lab_name, name, custom_image, custom_headers).value!
|
328
339
|
response.body unless response.nil?
|
329
340
|
end
|
330
341
|
|
@@ -335,14 +346,14 @@ module Azure::ARM::DevTestLabs
|
|
335
346
|
# @param resource_group_name [String] The name of the resource group.
|
336
347
|
# @param lab_name [String] The name of the lab.
|
337
348
|
# @param name [String] The name of the custom image.
|
338
|
-
# @param custom_image [CustomImage]
|
349
|
+
# @param custom_image [CustomImage] A custom image.
|
339
350
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
340
351
|
# will be added to the HTTP request.
|
341
352
|
#
|
342
353
|
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
343
354
|
#
|
344
|
-
def
|
345
|
-
|
355
|
+
def begin_create_or_update_with_http_info(resource_group_name, lab_name, name, custom_image, custom_headers = nil)
|
356
|
+
begin_create_or_update_async(resource_group_name, lab_name, name, custom_image, custom_headers).value!
|
346
357
|
end
|
347
358
|
|
348
359
|
#
|
@@ -352,13 +363,13 @@ module Azure::ARM::DevTestLabs
|
|
352
363
|
# @param resource_group_name [String] The name of the resource group.
|
353
364
|
# @param lab_name [String] The name of the lab.
|
354
365
|
# @param name [String] The name of the custom image.
|
355
|
-
# @param custom_image [CustomImage]
|
366
|
+
# @param custom_image [CustomImage] A custom image.
|
356
367
|
# @param [Hash{String => String}] A hash of custom headers that will be added
|
357
368
|
# to the HTTP request.
|
358
369
|
#
|
359
370
|
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
360
371
|
#
|
361
|
-
def
|
372
|
+
def begin_create_or_update_async(resource_group_name, lab_name, name, custom_image, custom_headers = nil)
|
362
373
|
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
363
374
|
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
364
375
|
fail ArgumentError, 'lab_name is nil' if lab_name.nil?
|
@@ -376,11 +387,11 @@ module Azure::ARM::DevTestLabs
|
|
376
387
|
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
377
388
|
|
378
389
|
# Serialize Request
|
379
|
-
request_mapper = CustomImage.mapper()
|
380
|
-
request_content = @client.serialize(request_mapper, custom_image
|
390
|
+
request_mapper = Azure::ARM::DevTestLabs::Models::CustomImage.mapper()
|
391
|
+
request_content = @client.serialize(request_mapper, custom_image)
|
381
392
|
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
382
393
|
|
383
|
-
path_template = '
|
394
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/customimages/{name}'
|
384
395
|
|
385
396
|
request_url = @base_url || @client.base_url
|
386
397
|
|
@@ -408,8 +419,8 @@ module Azure::ARM::DevTestLabs
|
|
408
419
|
if status_code == 200
|
409
420
|
begin
|
410
421
|
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
411
|
-
result_mapper = CustomImage.mapper()
|
412
|
-
result.body = @client.deserialize(result_mapper, parsed_response
|
422
|
+
result_mapper = Azure::ARM::DevTestLabs::Models::CustomImage.mapper()
|
423
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
413
424
|
rescue Exception => e
|
414
425
|
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
415
426
|
end
|
@@ -418,8 +429,8 @@ module Azure::ARM::DevTestLabs
|
|
418
429
|
if status_code == 201
|
419
430
|
begin
|
420
431
|
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
421
|
-
result_mapper = CustomImage.mapper()
|
422
|
-
result.body = @client.deserialize(result_mapper, parsed_response
|
432
|
+
result_mapper = Azure::ARM::DevTestLabs::Models::CustomImage.mapper()
|
433
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
423
434
|
rescue Exception => e
|
424
435
|
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
425
436
|
end
|
@@ -441,8 +452,8 @@ module Azure::ARM::DevTestLabs
|
|
441
452
|
# will be added to the HTTP request.
|
442
453
|
#
|
443
454
|
#
|
444
|
-
def
|
445
|
-
response =
|
455
|
+
def begin_delete(resource_group_name, lab_name, name, custom_headers = nil)
|
456
|
+
response = begin_delete_async(resource_group_name, lab_name, name, custom_headers).value!
|
446
457
|
nil
|
447
458
|
end
|
448
459
|
|
@@ -457,8 +468,8 @@ module Azure::ARM::DevTestLabs
|
|
457
468
|
#
|
458
469
|
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
459
470
|
#
|
460
|
-
def
|
461
|
-
|
471
|
+
def begin_delete_with_http_info(resource_group_name, lab_name, name, custom_headers = nil)
|
472
|
+
begin_delete_async(resource_group_name, lab_name, name, custom_headers).value!
|
462
473
|
end
|
463
474
|
|
464
475
|
#
|
@@ -472,7 +483,7 @@ module Azure::ARM::DevTestLabs
|
|
472
483
|
#
|
473
484
|
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
474
485
|
#
|
475
|
-
def
|
486
|
+
def begin_delete_async(resource_group_name, lab_name, name, custom_headers = nil)
|
476
487
|
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
477
488
|
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
478
489
|
fail ArgumentError, 'lab_name is nil' if lab_name.nil?
|
@@ -485,7 +496,7 @@ module Azure::ARM::DevTestLabs
|
|
485
496
|
# Set Headers
|
486
497
|
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
487
498
|
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
488
|
-
path_template = '
|
499
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/customimages/{name}'
|
489
500
|
|
490
501
|
request_url = @base_url || @client.base_url
|
491
502
|
|
@@ -589,8 +600,8 @@ module Azure::ARM::DevTestLabs
|
|
589
600
|
if status_code == 200
|
590
601
|
begin
|
591
602
|
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
592
|
-
result_mapper = ResponseWithContinuationCustomImage.mapper()
|
593
|
-
result.body = @client.deserialize(result_mapper, parsed_response
|
603
|
+
result_mapper = Azure::ARM::DevTestLabs::Models::ResponseWithContinuationCustomImage.mapper()
|
604
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
594
605
|
rescue Exception => e
|
595
606
|
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
596
607
|
end
|
@@ -607,10 +618,12 @@ module Azure::ARM::DevTestLabs
|
|
607
618
|
#
|
608
619
|
# @param resource_group_name [String] The name of the resource group.
|
609
620
|
# @param lab_name [String] The name of the lab.
|
610
|
-
# @param
|
621
|
+
# @param expand [String] Specify the $expand query. Example:
|
622
|
+
# 'properties($select=vm)'
|
623
|
+
# @param filter [String] The filter to apply to the operation.
|
611
624
|
# @param top [Integer] The maximum number of resources to return from the
|
612
625
|
# operation.
|
613
|
-
# @param
|
626
|
+
# @param orderby [String] The ordering expression for the results, using OData
|
614
627
|
# notation.
|
615
628
|
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
616
629
|
# will be added to the HTTP request.
|
@@ -618,8 +631,8 @@ module Azure::ARM::DevTestLabs
|
|
618
631
|
# @return [ResponseWithContinuationCustomImage] which provide lazy access to
|
619
632
|
# pages of the response.
|
620
633
|
#
|
621
|
-
def list_as_lazy(resource_group_name, lab_name, filter = nil, top = nil,
|
622
|
-
response = list_async(resource_group_name, lab_name, filter, top,
|
634
|
+
def list_as_lazy(resource_group_name, lab_name, expand = nil, filter = nil, top = nil, orderby = nil, custom_headers = nil)
|
635
|
+
response = list_async(resource_group_name, lab_name, expand, filter, top, orderby, custom_headers).value!
|
623
636
|
unless response.nil?
|
624
637
|
page = response.body
|
625
638
|
page.next_method = Proc.new do |next_page_link|
|