azure_mgmt_hybrid_compute 0.17.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/LICENSE.txt +21 -0
- data/lib/2019-12-12/generated/azure_mgmt_hybrid_compute.rb +72 -0
- data/lib/2019-12-12/generated/azure_mgmt_hybrid_compute/hybrid_compute_management_client.rb +139 -0
- data/lib/2019-12-12/generated/azure_mgmt_hybrid_compute/machine_extensions.rb +805 -0
- data/lib/2019-12-12/generated/azure_mgmt_hybrid_compute/machines.rb +630 -0
- data/lib/2019-12-12/generated/azure_mgmt_hybrid_compute/models/azure_entity_resource.rb +75 -0
- data/lib/2019-12-12/generated/azure_mgmt_hybrid_compute/models/error_additional_info.rb +59 -0
- data/lib/2019-12-12/generated/azure_mgmt_hybrid_compute/models/error_detail.rb +90 -0
- data/lib/2019-12-12/generated/azure_mgmt_hybrid_compute/models/error_response.rb +113 -0
- data/lib/2019-12-12/generated/azure_mgmt_hybrid_compute/models/identity.rb +72 -0
- data/lib/2019-12-12/generated/azure_mgmt_hybrid_compute/models/instance_view_types.rb +15 -0
- data/lib/2019-12-12/generated/azure_mgmt_hybrid_compute/models/location_data.rb +84 -0
- data/lib/2019-12-12/generated/azure_mgmt_hybrid_compute/models/machine.rb +287 -0
- data/lib/2019-12-12/generated/azure_mgmt_hybrid_compute/models/machine_extension.rb +195 -0
- data/lib/2019-12-12/generated/azure_mgmt_hybrid_compute/models/machine_extension_instance_view.rb +81 -0
- data/lib/2019-12-12/generated/azure_mgmt_hybrid_compute/models/machine_extension_instance_view_status.rb +92 -0
- data/lib/2019-12-12/generated/azure_mgmt_hybrid_compute/models/machine_extension_properties_instance_view.rb +68 -0
- data/lib/2019-12-12/generated/azure_mgmt_hybrid_compute/models/machine_extension_properties_model.rb +144 -0
- data/lib/2019-12-12/generated/azure_mgmt_hybrid_compute/models/machine_extension_update.rb +134 -0
- data/lib/2019-12-12/generated/azure_mgmt_hybrid_compute/models/machine_extension_update_properties_model.rb +118 -0
- data/lib/2019-12-12/generated/azure_mgmt_hybrid_compute/models/machine_extensions_list_result.rb +99 -0
- data/lib/2019-12-12/generated/azure_mgmt_hybrid_compute/models/machine_identity.rb +63 -0
- data/lib/2019-12-12/generated/azure_mgmt_hybrid_compute/models/machine_list_result.rb +99 -0
- data/lib/2019-12-12/generated/azure_mgmt_hybrid_compute/models/machine_properties.rb +224 -0
- data/lib/2019-12-12/generated/azure_mgmt_hybrid_compute/models/machine_properties_os_profile.rb +44 -0
- data/lib/2019-12-12/generated/azure_mgmt_hybrid_compute/models/machine_reconnect.rb +58 -0
- data/lib/2019-12-12/generated/azure_mgmt_hybrid_compute/models/machine_reconnect_properties.rb +58 -0
- data/lib/2019-12-12/generated/azure_mgmt_hybrid_compute/models/machine_update.rb +100 -0
- data/lib/2019-12-12/generated/azure_mgmt_hybrid_compute/models/machine_update_properties.rb +47 -0
- data/lib/2019-12-12/generated/azure_mgmt_hybrid_compute/models/operation_list_result.rb +56 -0
- data/lib/2019-12-12/generated/azure_mgmt_hybrid_compute/models/operation_value.rb +108 -0
- data/lib/2019-12-12/generated/azure_mgmt_hybrid_compute/models/operation_value_display_model.rb +84 -0
- data/lib/2019-12-12/generated/azure_mgmt_hybrid_compute/models/osprofile.rb +47 -0
- data/lib/2019-12-12/generated/azure_mgmt_hybrid_compute/models/plan.rb +95 -0
- data/lib/2019-12-12/generated/azure_mgmt_hybrid_compute/models/proxy_resource.rb +63 -0
- data/lib/2019-12-12/generated/azure_mgmt_hybrid_compute/models/resource.rb +83 -0
- data/lib/2019-12-12/generated/azure_mgmt_hybrid_compute/models/resource_identity_type.rb +15 -0
- data/lib/2019-12-12/generated/azure_mgmt_hybrid_compute/models/resource_model_with_allowed_property_set.rb +191 -0
- data/lib/2019-12-12/generated/azure_mgmt_hybrid_compute/models/resource_model_with_allowed_property_set_identity.rb +64 -0
- data/lib/2019-12-12/generated/azure_mgmt_hybrid_compute/models/resource_model_with_allowed_property_set_plan.rb +76 -0
- data/lib/2019-12-12/generated/azure_mgmt_hybrid_compute/models/resource_model_with_allowed_property_set_sku.rb +77 -0
- data/lib/2019-12-12/generated/azure_mgmt_hybrid_compute/models/sku.rb +99 -0
- data/lib/2019-12-12/generated/azure_mgmt_hybrid_compute/models/sku_tier.rb +18 -0
- data/lib/2019-12-12/generated/azure_mgmt_hybrid_compute/models/status_level_types.rb +17 -0
- data/lib/2019-12-12/generated/azure_mgmt_hybrid_compute/models/status_types.rb +17 -0
- data/lib/2019-12-12/generated/azure_mgmt_hybrid_compute/models/tracked_resource.rb +92 -0
- data/lib/2019-12-12/generated/azure_mgmt_hybrid_compute/models/update_resource.rb +54 -0
- data/lib/2019-12-12/generated/azure_mgmt_hybrid_compute/module_definition.rb +9 -0
- data/lib/2019-12-12/generated/azure_mgmt_hybrid_compute/operations.rb +110 -0
- data/lib/2020-08-02/generated/azure_mgmt_hybrid_compute.rb +61 -0
- data/lib/2020-08-02/generated/azure_mgmt_hybrid_compute/hybrid_compute_management_client.rb +141 -0
- data/lib/2020-08-02/generated/azure_mgmt_hybrid_compute/machine_extensions.rb +795 -0
- data/lib/2020-08-02/generated/azure_mgmt_hybrid_compute/machines.rb +622 -0
- data/lib/2020-08-02/generated/azure_mgmt_hybrid_compute/models/azure_entity_resource.rb +75 -0
- data/lib/2020-08-02/generated/azure_mgmt_hybrid_compute/models/error_detail.rb +90 -0
- data/lib/2020-08-02/generated/azure_mgmt_hybrid_compute/models/error_response.rb +49 -0
- data/lib/2020-08-02/generated/azure_mgmt_hybrid_compute/models/identity.rb +71 -0
- data/lib/2020-08-02/generated/azure_mgmt_hybrid_compute/models/instance_view_types.rb +15 -0
- data/lib/2020-08-02/generated/azure_mgmt_hybrid_compute/models/location_data.rb +84 -0
- data/lib/2020-08-02/generated/azure_mgmt_hybrid_compute/models/machine.rb +348 -0
- data/lib/2020-08-02/generated/azure_mgmt_hybrid_compute/models/machine_extension.rb +195 -0
- data/lib/2020-08-02/generated/azure_mgmt_hybrid_compute/models/machine_extension_instance_view.rb +84 -0
- data/lib/2020-08-02/generated/azure_mgmt_hybrid_compute/models/machine_extension_instance_view_status.rb +97 -0
- data/lib/2020-08-02/generated/azure_mgmt_hybrid_compute/models/machine_extension_properties_instance_view.rb +71 -0
- data/lib/2020-08-02/generated/azure_mgmt_hybrid_compute/models/machine_extension_properties_model.rb +144 -0
- data/lib/2020-08-02/generated/azure_mgmt_hybrid_compute/models/machine_extension_update.rb +134 -0
- data/lib/2020-08-02/generated/azure_mgmt_hybrid_compute/models/machine_extension_update_properties_model.rb +118 -0
- data/lib/2020-08-02/generated/azure_mgmt_hybrid_compute/models/machine_extensions_list_result.rb +99 -0
- data/lib/2020-08-02/generated/azure_mgmt_hybrid_compute/models/machine_identity.rb +62 -0
- data/lib/2020-08-02/generated/azure_mgmt_hybrid_compute/models/machine_list_result.rb +99 -0
- data/lib/2020-08-02/generated/azure_mgmt_hybrid_compute/models/machine_properties.rb +285 -0
- data/lib/2020-08-02/generated/azure_mgmt_hybrid_compute/models/machine_properties_os_profile.rb +44 -0
- data/lib/2020-08-02/generated/azure_mgmt_hybrid_compute/models/machine_update.rb +98 -0
- data/lib/2020-08-02/generated/azure_mgmt_hybrid_compute/models/machine_update_properties.rb +47 -0
- data/lib/2020-08-02/generated/azure_mgmt_hybrid_compute/models/operation_list_result.rb +56 -0
- data/lib/2020-08-02/generated/azure_mgmt_hybrid_compute/models/operation_value.rb +108 -0
- data/lib/2020-08-02/generated/azure_mgmt_hybrid_compute/models/operation_value_display_model.rb +84 -0
- data/lib/2020-08-02/generated/azure_mgmt_hybrid_compute/models/osprofile.rb +47 -0
- data/lib/2020-08-02/generated/azure_mgmt_hybrid_compute/models/proxy_resource.rb +63 -0
- data/lib/2020-08-02/generated/azure_mgmt_hybrid_compute/models/resource.rb +83 -0
- data/lib/2020-08-02/generated/azure_mgmt_hybrid_compute/models/status_level_types.rb +17 -0
- data/lib/2020-08-02/generated/azure_mgmt_hybrid_compute/models/status_types.rb +17 -0
- data/lib/2020-08-02/generated/azure_mgmt_hybrid_compute/models/tracked_resource.rb +92 -0
- data/lib/2020-08-02/generated/azure_mgmt_hybrid_compute/models/update_resource.rb +54 -0
- data/lib/2020-08-02/generated/azure_mgmt_hybrid_compute/module_definition.rb +9 -0
- data/lib/2020-08-02/generated/azure_mgmt_hybrid_compute/operations.rb +109 -0
- data/lib/azure_mgmt_hybrid_compute.rb +7 -0
- data/lib/module_definition.rb +7 -0
- data/lib/profiles/latest/hybridcompute_latest_profile_client.rb +40 -0
- data/lib/profiles/latest/hybridcompute_module_definition.rb +8 -0
- data/lib/profiles/latest/modules/hybridcompute_profile_module.rb +189 -0
- data/lib/version.rb +7 -0
- metadata +209 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 4cdddbd645fbd4283396893611ff421875b4cb56f189d44e65b269d5aaff4cb2
|
4
|
+
data.tar.gz: 91ca0bf7460ea623502f7a01dc72876108aae5999c2bc4b791fb3f2dd1ca3ee9
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: '003292ec968142936effd83548471122404f7641603a18f62087658f047770edb5b20e65f57b38b524816adf55144fb6eb8af4552efa486c41419774bde07395'
|
7
|
+
data.tar.gz: 74d60bce91eeb0fe6e943f7265ad3dca85647c8ee8633d2f281e193c18466689dffb84a7baaaf4fc464dc3fa03d045d66d0a1cd2686d7569f46762015deffefb
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2015 Microsoft Corporation
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
@@ -0,0 +1,72 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator.
|
3
|
+
# Changes may cause incorrect behavior and will be lost if the code is
|
4
|
+
# regenerated.
|
5
|
+
|
6
|
+
require 'uri'
|
7
|
+
require 'cgi'
|
8
|
+
require 'date'
|
9
|
+
require 'json'
|
10
|
+
require 'base64'
|
11
|
+
require 'erb'
|
12
|
+
require 'securerandom'
|
13
|
+
require 'time'
|
14
|
+
require 'timeliness'
|
15
|
+
require 'faraday'
|
16
|
+
require 'faraday-cookie_jar'
|
17
|
+
require 'concurrent'
|
18
|
+
require 'ms_rest'
|
19
|
+
require '2019-12-12/generated/azure_mgmt_hybrid_compute/module_definition'
|
20
|
+
require 'ms_rest_azure'
|
21
|
+
|
22
|
+
module Azure::HybridCompute::Mgmt::V2019_12_12
|
23
|
+
autoload :Machines, '2019-12-12/generated/azure_mgmt_hybrid_compute/machines.rb'
|
24
|
+
autoload :MachineExtensions, '2019-12-12/generated/azure_mgmt_hybrid_compute/machine_extensions.rb'
|
25
|
+
autoload :Operations, '2019-12-12/generated/azure_mgmt_hybrid_compute/operations.rb'
|
26
|
+
autoload :HybridComputeManagementClient, '2019-12-12/generated/azure_mgmt_hybrid_compute/hybrid_compute_management_client.rb'
|
27
|
+
|
28
|
+
module Models
|
29
|
+
autoload :Sku, '2019-12-12/generated/azure_mgmt_hybrid_compute/models/sku.rb'
|
30
|
+
autoload :OperationValue, '2019-12-12/generated/azure_mgmt_hybrid_compute/models/operation_value.rb'
|
31
|
+
autoload :ResourceModelWithAllowedPropertySet, '2019-12-12/generated/azure_mgmt_hybrid_compute/models/resource_model_with_allowed_property_set.rb'
|
32
|
+
autoload :OperationValueDisplayModel, '2019-12-12/generated/azure_mgmt_hybrid_compute/models/operation_value_display_model.rb'
|
33
|
+
autoload :MachineReconnect, '2019-12-12/generated/azure_mgmt_hybrid_compute/models/machine_reconnect.rb'
|
34
|
+
autoload :LocationData, '2019-12-12/generated/azure_mgmt_hybrid_compute/models/location_data.rb'
|
35
|
+
autoload :MachineListResult, '2019-12-12/generated/azure_mgmt_hybrid_compute/models/machine_list_result.rb'
|
36
|
+
autoload :ErrorDetail, '2019-12-12/generated/azure_mgmt_hybrid_compute/models/error_detail.rb'
|
37
|
+
autoload :UpdateResource, '2019-12-12/generated/azure_mgmt_hybrid_compute/models/update_resource.rb'
|
38
|
+
autoload :MachineExtensionInstanceView, '2019-12-12/generated/azure_mgmt_hybrid_compute/models/machine_extension_instance_view.rb'
|
39
|
+
autoload :MachineReconnectProperties, '2019-12-12/generated/azure_mgmt_hybrid_compute/models/machine_reconnect_properties.rb'
|
40
|
+
autoload :ErrorResponse, '2019-12-12/generated/azure_mgmt_hybrid_compute/models/error_response.rb'
|
41
|
+
autoload :Resource, '2019-12-12/generated/azure_mgmt_hybrid_compute/models/resource.rb'
|
42
|
+
autoload :OperationListResult, '2019-12-12/generated/azure_mgmt_hybrid_compute/models/operation_list_result.rb'
|
43
|
+
autoload :ErrorAdditionalInfo, '2019-12-12/generated/azure_mgmt_hybrid_compute/models/error_additional_info.rb'
|
44
|
+
autoload :Plan, '2019-12-12/generated/azure_mgmt_hybrid_compute/models/plan.rb'
|
45
|
+
autoload :MachineExtensionInstanceViewStatus, '2019-12-12/generated/azure_mgmt_hybrid_compute/models/machine_extension_instance_view_status.rb'
|
46
|
+
autoload :MachineExtensionPropertiesModel, '2019-12-12/generated/azure_mgmt_hybrid_compute/models/machine_extension_properties_model.rb'
|
47
|
+
autoload :MachineUpdateProperties, '2019-12-12/generated/azure_mgmt_hybrid_compute/models/machine_update_properties.rb'
|
48
|
+
autoload :MachineExtensionUpdatePropertiesModel, '2019-12-12/generated/azure_mgmt_hybrid_compute/models/machine_extension_update_properties_model.rb'
|
49
|
+
autoload :MachineProperties, '2019-12-12/generated/azure_mgmt_hybrid_compute/models/machine_properties.rb'
|
50
|
+
autoload :MachineExtensionsListResult, '2019-12-12/generated/azure_mgmt_hybrid_compute/models/machine_extensions_list_result.rb'
|
51
|
+
autoload :OSProfile, '2019-12-12/generated/azure_mgmt_hybrid_compute/models/osprofile.rb'
|
52
|
+
autoload :Identity, '2019-12-12/generated/azure_mgmt_hybrid_compute/models/identity.rb'
|
53
|
+
autoload :MachinePropertiesOsProfile, '2019-12-12/generated/azure_mgmt_hybrid_compute/models/machine_properties_os_profile.rb'
|
54
|
+
autoload :MachineIdentity, '2019-12-12/generated/azure_mgmt_hybrid_compute/models/machine_identity.rb'
|
55
|
+
autoload :Machine, '2019-12-12/generated/azure_mgmt_hybrid_compute/models/machine.rb'
|
56
|
+
autoload :MachineUpdate, '2019-12-12/generated/azure_mgmt_hybrid_compute/models/machine_update.rb'
|
57
|
+
autoload :TrackedResource, '2019-12-12/generated/azure_mgmt_hybrid_compute/models/tracked_resource.rb'
|
58
|
+
autoload :MachineExtension, '2019-12-12/generated/azure_mgmt_hybrid_compute/models/machine_extension.rb'
|
59
|
+
autoload :MachineExtensionUpdate, '2019-12-12/generated/azure_mgmt_hybrid_compute/models/machine_extension_update.rb'
|
60
|
+
autoload :MachineExtensionPropertiesInstanceView, '2019-12-12/generated/azure_mgmt_hybrid_compute/models/machine_extension_properties_instance_view.rb'
|
61
|
+
autoload :ProxyResource, '2019-12-12/generated/azure_mgmt_hybrid_compute/models/proxy_resource.rb'
|
62
|
+
autoload :AzureEntityResource, '2019-12-12/generated/azure_mgmt_hybrid_compute/models/azure_entity_resource.rb'
|
63
|
+
autoload :ResourceModelWithAllowedPropertySetIdentity, '2019-12-12/generated/azure_mgmt_hybrid_compute/models/resource_model_with_allowed_property_set_identity.rb'
|
64
|
+
autoload :ResourceModelWithAllowedPropertySetSku, '2019-12-12/generated/azure_mgmt_hybrid_compute/models/resource_model_with_allowed_property_set_sku.rb'
|
65
|
+
autoload :ResourceModelWithAllowedPropertySetPlan, '2019-12-12/generated/azure_mgmt_hybrid_compute/models/resource_model_with_allowed_property_set_plan.rb'
|
66
|
+
autoload :StatusTypes, '2019-12-12/generated/azure_mgmt_hybrid_compute/models/status_types.rb'
|
67
|
+
autoload :StatusLevelTypes, '2019-12-12/generated/azure_mgmt_hybrid_compute/models/status_level_types.rb'
|
68
|
+
autoload :SkuTier, '2019-12-12/generated/azure_mgmt_hybrid_compute/models/sku_tier.rb'
|
69
|
+
autoload :ResourceIdentityType, '2019-12-12/generated/azure_mgmt_hybrid_compute/models/resource_identity_type.rb'
|
70
|
+
autoload :InstanceViewTypes, '2019-12-12/generated/azure_mgmt_hybrid_compute/models/instance_view_types.rb'
|
71
|
+
end
|
72
|
+
end
|
@@ -0,0 +1,139 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator.
|
3
|
+
# Changes may cause incorrect behavior and will be lost if the code is
|
4
|
+
# regenerated.
|
5
|
+
|
6
|
+
module Azure::HybridCompute::Mgmt::V2019_12_12
|
7
|
+
#
|
8
|
+
# A service client - single point of access to the REST API.
|
9
|
+
#
|
10
|
+
class HybridComputeManagementClient < MsRestAzure::AzureServiceClient
|
11
|
+
include MsRestAzure
|
12
|
+
include MsRestAzure::Serialization
|
13
|
+
|
14
|
+
# @return [String] the base URI of the service.
|
15
|
+
attr_accessor :base_url
|
16
|
+
|
17
|
+
# @return Credentials needed for the client to connect to Azure.
|
18
|
+
attr_reader :credentials
|
19
|
+
|
20
|
+
# @return [String] The API version to use for this operation.
|
21
|
+
attr_reader :api_version
|
22
|
+
|
23
|
+
# @return [String] The ID of the target subscription.
|
24
|
+
attr_accessor :subscription_id
|
25
|
+
|
26
|
+
# @return [String] The preferred language for the response.
|
27
|
+
attr_accessor :accept_language
|
28
|
+
|
29
|
+
# @return [Integer] The retry timeout in seconds for Long Running
|
30
|
+
# Operations. Default value is 30.
|
31
|
+
attr_accessor :long_running_operation_retry_timeout
|
32
|
+
|
33
|
+
# @return [Boolean] Whether a unique x-ms-client-request-id should be
|
34
|
+
# generated. When set to true a unique x-ms-client-request-id value is
|
35
|
+
# generated and included in each request. Default is true.
|
36
|
+
attr_accessor :generate_client_request_id
|
37
|
+
|
38
|
+
# @return [Machines] machines
|
39
|
+
attr_reader :machines
|
40
|
+
|
41
|
+
# @return [MachineExtensions] machine_extensions
|
42
|
+
attr_reader :machine_extensions
|
43
|
+
|
44
|
+
# @return [Operations] operations
|
45
|
+
attr_reader :operations
|
46
|
+
|
47
|
+
#
|
48
|
+
# Creates initializes a new instance of the HybridComputeManagementClient class.
|
49
|
+
# @param credentials [MsRest::ServiceClientCredentials] credentials to authorize HTTP requests made by the service client.
|
50
|
+
# @param base_url [String] the base URI of the service.
|
51
|
+
# @param options [Array] filters to be applied to the HTTP requests.
|
52
|
+
#
|
53
|
+
def initialize(credentials = nil, base_url = nil, options = nil)
|
54
|
+
super(credentials, options)
|
55
|
+
@base_url = base_url || 'https://management.azure.com'
|
56
|
+
|
57
|
+
fail ArgumentError, 'invalid type of credentials input parameter' unless credentials.is_a?(MsRest::ServiceClientCredentials) unless credentials.nil?
|
58
|
+
@credentials = credentials
|
59
|
+
|
60
|
+
@machines = Machines.new(self)
|
61
|
+
@machine_extensions = MachineExtensions.new(self)
|
62
|
+
@operations = Operations.new(self)
|
63
|
+
@api_version = '2019-12-12'
|
64
|
+
@accept_language = 'en-US'
|
65
|
+
@long_running_operation_retry_timeout = 30
|
66
|
+
@generate_client_request_id = true
|
67
|
+
add_telemetry
|
68
|
+
end
|
69
|
+
|
70
|
+
#
|
71
|
+
# Makes a request and returns the body of the response.
|
72
|
+
# @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete.
|
73
|
+
# @param path [String] the path, relative to {base_url}.
|
74
|
+
# @param options [Hash{String=>String}] specifying any request options like :body.
|
75
|
+
# @return [Hash{String=>String}] containing the body of the response.
|
76
|
+
# Example:
|
77
|
+
#
|
78
|
+
# request_content = "{'location':'westus','tags':{'tag1':'val1','tag2':'val2'}}"
|
79
|
+
# path = "/path"
|
80
|
+
# options = {
|
81
|
+
# body: request_content,
|
82
|
+
# query_params: {'api-version' => '2016-02-01'}
|
83
|
+
# }
|
84
|
+
# result = @client.make_request(:put, path, options)
|
85
|
+
#
|
86
|
+
def make_request(method, path, options = {})
|
87
|
+
result = make_request_with_http_info(method, path, options)
|
88
|
+
result.body unless result.nil?
|
89
|
+
end
|
90
|
+
|
91
|
+
#
|
92
|
+
# Makes a request and returns the operation response.
|
93
|
+
# @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete.
|
94
|
+
# @param path [String] the path, relative to {base_url}.
|
95
|
+
# @param options [Hash{String=>String}] specifying any request options like :body.
|
96
|
+
# @return [MsRestAzure::AzureOperationResponse] Operation response containing the request, response and status.
|
97
|
+
#
|
98
|
+
def make_request_with_http_info(method, path, options = {})
|
99
|
+
result = make_request_async(method, path, options).value!
|
100
|
+
result.body = result.response.body.to_s.empty? ? nil : JSON.load(result.response.body)
|
101
|
+
result
|
102
|
+
end
|
103
|
+
|
104
|
+
#
|
105
|
+
# Makes a request asynchronously.
|
106
|
+
# @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete.
|
107
|
+
# @param path [String] the path, relative to {base_url}.
|
108
|
+
# @param options [Hash{String=>String}] specifying any request options like :body.
|
109
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
110
|
+
#
|
111
|
+
def make_request_async(method, path, options = {})
|
112
|
+
fail ArgumentError, 'method is nil' if method.nil?
|
113
|
+
fail ArgumentError, 'path is nil' if path.nil?
|
114
|
+
|
115
|
+
request_url = options[:base_url] || @base_url
|
116
|
+
if(!options[:headers].nil? && !options[:headers]['Content-Type'].nil?)
|
117
|
+
@request_headers['Content-Type'] = options[:headers]['Content-Type']
|
118
|
+
end
|
119
|
+
|
120
|
+
request_headers = @request_headers
|
121
|
+
request_headers.merge!({'accept-language' => @accept_language}) unless @accept_language.nil?
|
122
|
+
options.merge!({headers: request_headers.merge(options[:headers] || {})})
|
123
|
+
options.merge!({credentials: @credentials}) unless @credentials.nil?
|
124
|
+
|
125
|
+
super(request_url, method, path, options)
|
126
|
+
end
|
127
|
+
|
128
|
+
|
129
|
+
private
|
130
|
+
#
|
131
|
+
# Adds telemetry information.
|
132
|
+
#
|
133
|
+
def add_telemetry
|
134
|
+
sdk_information = 'azure_mgmt_hybrid_compute'
|
135
|
+
sdk_information = "#{sdk_information}/0.17.0"
|
136
|
+
add_user_agent_information(sdk_information)
|
137
|
+
end
|
138
|
+
end
|
139
|
+
end
|
@@ -0,0 +1,805 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator.
|
3
|
+
# Changes may cause incorrect behavior and will be lost if the code is
|
4
|
+
# regenerated.
|
5
|
+
|
6
|
+
module Azure::HybridCompute::Mgmt::V2019_12_12
|
7
|
+
#
|
8
|
+
# The Hybrid Compute Management Client.
|
9
|
+
#
|
10
|
+
class MachineExtensions
|
11
|
+
include MsRestAzure
|
12
|
+
|
13
|
+
#
|
14
|
+
# Creates and initializes a new instance of the MachineExtensions class.
|
15
|
+
# @param client service class for accessing basic functionality.
|
16
|
+
#
|
17
|
+
def initialize(client)
|
18
|
+
@client = client
|
19
|
+
end
|
20
|
+
|
21
|
+
# @return [HybridComputeManagementClient] reference to the HybridComputeManagementClient
|
22
|
+
attr_reader :client
|
23
|
+
|
24
|
+
#
|
25
|
+
# The operation to create or update the extension.
|
26
|
+
#
|
27
|
+
# @param resource_group_name [String] The name of the resource group.
|
28
|
+
# @param name [String] The name of the machine where the extension should be
|
29
|
+
# created or updated.
|
30
|
+
# @param extension_name [String] The name of the machine extension.
|
31
|
+
# @param extension_parameters [MachineExtension] Parameters supplied to the
|
32
|
+
# Create Machine Extension operation.
|
33
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
34
|
+
# will be added to the HTTP request.
|
35
|
+
#
|
36
|
+
# @return [MachineExtension] operation results.
|
37
|
+
#
|
38
|
+
def create_or_update(resource_group_name, name, extension_name, extension_parameters, custom_headers:nil)
|
39
|
+
response = create_or_update_async(resource_group_name, name, extension_name, extension_parameters, custom_headers:custom_headers).value!
|
40
|
+
response.body unless response.nil?
|
41
|
+
end
|
42
|
+
|
43
|
+
#
|
44
|
+
# @param resource_group_name [String] The name of the resource group.
|
45
|
+
# @param name [String] The name of the machine where the extension should be
|
46
|
+
# created or updated.
|
47
|
+
# @param extension_name [String] The name of the machine extension.
|
48
|
+
# @param extension_parameters [MachineExtension] Parameters supplied to the
|
49
|
+
# Create Machine Extension operation.
|
50
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
51
|
+
# will be added to the HTTP request.
|
52
|
+
#
|
53
|
+
# @return [Concurrent::Promise] promise which provides async access to http
|
54
|
+
# response.
|
55
|
+
#
|
56
|
+
def create_or_update_async(resource_group_name, name, extension_name, extension_parameters, custom_headers:nil)
|
57
|
+
# Send request
|
58
|
+
promise = begin_create_or_update_async(resource_group_name, name, extension_name, extension_parameters, custom_headers:custom_headers)
|
59
|
+
|
60
|
+
promise = promise.then do |response|
|
61
|
+
# Defining deserialization method.
|
62
|
+
deserialize_method = lambda do |parsed_response|
|
63
|
+
result_mapper = Azure::HybridCompute::Mgmt::V2019_12_12::Models::MachineExtension.mapper()
|
64
|
+
parsed_response = @client.deserialize(result_mapper, parsed_response)
|
65
|
+
end
|
66
|
+
|
67
|
+
# Waiting for response.
|
68
|
+
@client.get_long_running_operation_result(response, deserialize_method)
|
69
|
+
end
|
70
|
+
|
71
|
+
promise
|
72
|
+
end
|
73
|
+
|
74
|
+
#
|
75
|
+
# The operation to create or update the extension.
|
76
|
+
#
|
77
|
+
# @param resource_group_name [String] The name of the resource group.
|
78
|
+
# @param name [String] The name of the machine where the extension should be
|
79
|
+
# created or updated.
|
80
|
+
# @param extension_name [String] The name of the machine extension.
|
81
|
+
# @param extension_parameters [MachineExtensionUpdate] Parameters supplied to
|
82
|
+
# the Create Machine Extension operation.
|
83
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
84
|
+
# will be added to the HTTP request.
|
85
|
+
#
|
86
|
+
# @return [MachineExtension] operation results.
|
87
|
+
#
|
88
|
+
def update(resource_group_name, name, extension_name, extension_parameters, custom_headers:nil)
|
89
|
+
response = update_async(resource_group_name, name, extension_name, extension_parameters, custom_headers:custom_headers).value!
|
90
|
+
response.body unless response.nil?
|
91
|
+
end
|
92
|
+
|
93
|
+
#
|
94
|
+
# @param resource_group_name [String] The name of the resource group.
|
95
|
+
# @param name [String] The name of the machine where the extension should be
|
96
|
+
# created or updated.
|
97
|
+
# @param extension_name [String] The name of the machine extension.
|
98
|
+
# @param extension_parameters [MachineExtensionUpdate] Parameters supplied to
|
99
|
+
# the Create Machine Extension operation.
|
100
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
101
|
+
# will be added to the HTTP request.
|
102
|
+
#
|
103
|
+
# @return [Concurrent::Promise] promise which provides async access to http
|
104
|
+
# response.
|
105
|
+
#
|
106
|
+
def update_async(resource_group_name, name, extension_name, extension_parameters, custom_headers:nil)
|
107
|
+
# Send request
|
108
|
+
promise = begin_update_async(resource_group_name, name, extension_name, extension_parameters, custom_headers:custom_headers)
|
109
|
+
|
110
|
+
promise = promise.then do |response|
|
111
|
+
# Defining deserialization method.
|
112
|
+
deserialize_method = lambda do |parsed_response|
|
113
|
+
result_mapper = Azure::HybridCompute::Mgmt::V2019_12_12::Models::MachineExtension.mapper()
|
114
|
+
parsed_response = @client.deserialize(result_mapper, parsed_response)
|
115
|
+
end
|
116
|
+
|
117
|
+
# Waiting for response.
|
118
|
+
@client.get_long_running_operation_result(response, deserialize_method)
|
119
|
+
end
|
120
|
+
|
121
|
+
promise
|
122
|
+
end
|
123
|
+
|
124
|
+
#
|
125
|
+
# The operation to delete the extension.
|
126
|
+
#
|
127
|
+
# @param resource_group_name [String] The name of the resource group.
|
128
|
+
# @param name [String] The name of the machine where the extension should be
|
129
|
+
# deleted.
|
130
|
+
# @param extension_name [String] The name of the machine extension.
|
131
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
132
|
+
# will be added to the HTTP request.
|
133
|
+
#
|
134
|
+
def delete(resource_group_name, name, extension_name, custom_headers:nil)
|
135
|
+
response = delete_async(resource_group_name, name, extension_name, custom_headers:custom_headers).value!
|
136
|
+
nil
|
137
|
+
end
|
138
|
+
|
139
|
+
#
|
140
|
+
# @param resource_group_name [String] The name of the resource group.
|
141
|
+
# @param name [String] The name of the machine where the extension should be
|
142
|
+
# deleted.
|
143
|
+
# @param extension_name [String] The name of the machine extension.
|
144
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
145
|
+
# will be added to the HTTP request.
|
146
|
+
#
|
147
|
+
# @return [Concurrent::Promise] promise which provides async access to http
|
148
|
+
# response.
|
149
|
+
#
|
150
|
+
def delete_async(resource_group_name, name, extension_name, custom_headers:nil)
|
151
|
+
# Send request
|
152
|
+
promise = begin_delete_async(resource_group_name, name, extension_name, custom_headers:custom_headers)
|
153
|
+
|
154
|
+
promise = promise.then do |response|
|
155
|
+
# Defining deserialization method.
|
156
|
+
deserialize_method = lambda do |parsed_response|
|
157
|
+
end
|
158
|
+
|
159
|
+
# Waiting for response.
|
160
|
+
@client.get_long_running_operation_result(response, deserialize_method)
|
161
|
+
end
|
162
|
+
|
163
|
+
promise
|
164
|
+
end
|
165
|
+
|
166
|
+
#
|
167
|
+
# The operation to get the extension.
|
168
|
+
#
|
169
|
+
# @param resource_group_name [String] The name of the resource group.
|
170
|
+
# @param name [String] The name of the machine containing the extension.
|
171
|
+
# @param extension_name [String] The name of the machine extension.
|
172
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
173
|
+
# will be added to the HTTP request.
|
174
|
+
#
|
175
|
+
# @return [MachineExtension] operation results.
|
176
|
+
#
|
177
|
+
def get(resource_group_name, name, extension_name, custom_headers:nil)
|
178
|
+
response = get_async(resource_group_name, name, extension_name, custom_headers:custom_headers).value!
|
179
|
+
response.body unless response.nil?
|
180
|
+
end
|
181
|
+
|
182
|
+
#
|
183
|
+
# The operation to get the extension.
|
184
|
+
#
|
185
|
+
# @param resource_group_name [String] The name of the resource group.
|
186
|
+
# @param name [String] The name of the machine containing the extension.
|
187
|
+
# @param extension_name [String] The name of the machine extension.
|
188
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
189
|
+
# will be added to the HTTP request.
|
190
|
+
#
|
191
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
192
|
+
#
|
193
|
+
def get_with_http_info(resource_group_name, name, extension_name, custom_headers:nil)
|
194
|
+
get_async(resource_group_name, name, extension_name, custom_headers:custom_headers).value!
|
195
|
+
end
|
196
|
+
|
197
|
+
#
|
198
|
+
# The operation to get the extension.
|
199
|
+
#
|
200
|
+
# @param resource_group_name [String] The name of the resource group.
|
201
|
+
# @param name [String] The name of the machine containing the extension.
|
202
|
+
# @param extension_name [String] The name of the machine extension.
|
203
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
204
|
+
# to the HTTP request.
|
205
|
+
#
|
206
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
207
|
+
#
|
208
|
+
def get_async(resource_group_name, name, extension_name, custom_headers:nil)
|
209
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
210
|
+
fail ArgumentError, 'name is nil' if name.nil?
|
211
|
+
fail ArgumentError, 'extension_name is nil' if extension_name.nil?
|
212
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
213
|
+
fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1
|
214
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
215
|
+
fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1
|
216
|
+
|
217
|
+
|
218
|
+
request_headers = {}
|
219
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
220
|
+
|
221
|
+
# Set Headers
|
222
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
223
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
224
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{name}/extensions/{extensionName}'
|
225
|
+
|
226
|
+
request_url = @base_url || @client.base_url
|
227
|
+
|
228
|
+
options = {
|
229
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
230
|
+
path_params: {'resourceGroupName' => resource_group_name,'name' => name,'extensionName' => extension_name,'subscriptionId' => @client.subscription_id},
|
231
|
+
query_params: {'api-version' => @client.api_version},
|
232
|
+
headers: request_headers.merge(custom_headers || {}),
|
233
|
+
base_url: request_url
|
234
|
+
}
|
235
|
+
promise = @client.make_request_async(:get, path_template, options)
|
236
|
+
|
237
|
+
promise = promise.then do |result|
|
238
|
+
http_response = result.response
|
239
|
+
status_code = http_response.status
|
240
|
+
response_content = http_response.body
|
241
|
+
unless status_code == 200
|
242
|
+
error_model = JSON.load(response_content)
|
243
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
244
|
+
end
|
245
|
+
|
246
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
247
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
248
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
249
|
+
# Deserialize Response
|
250
|
+
if status_code == 200
|
251
|
+
begin
|
252
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
253
|
+
result_mapper = Azure::HybridCompute::Mgmt::V2019_12_12::Models::MachineExtension.mapper()
|
254
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
255
|
+
rescue Exception => e
|
256
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
257
|
+
end
|
258
|
+
end
|
259
|
+
|
260
|
+
result
|
261
|
+
end
|
262
|
+
|
263
|
+
promise.execute
|
264
|
+
end
|
265
|
+
|
266
|
+
#
|
267
|
+
# The operation to get all extensions of a non-Azure machine
|
268
|
+
#
|
269
|
+
# @param resource_group_name [String] The name of the resource group.
|
270
|
+
# @param name [String] The name of the machine containing the extension.
|
271
|
+
# @param expand [String] The expand expression to apply on the operation.
|
272
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
273
|
+
# will be added to the HTTP request.
|
274
|
+
#
|
275
|
+
# @return [Array<MachineExtension>] operation results.
|
276
|
+
#
|
277
|
+
def list(resource_group_name, name, expand:nil, custom_headers:nil)
|
278
|
+
first_page = list_as_lazy(resource_group_name, name, expand:expand, custom_headers:custom_headers)
|
279
|
+
first_page.get_all_items
|
280
|
+
end
|
281
|
+
|
282
|
+
#
|
283
|
+
# The operation to get all extensions of a non-Azure machine
|
284
|
+
#
|
285
|
+
# @param resource_group_name [String] The name of the resource group.
|
286
|
+
# @param name [String] The name of the machine containing the extension.
|
287
|
+
# @param expand [String] The expand expression to apply on the operation.
|
288
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
289
|
+
# will be added to the HTTP request.
|
290
|
+
#
|
291
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
292
|
+
#
|
293
|
+
def list_with_http_info(resource_group_name, name, expand:nil, custom_headers:nil)
|
294
|
+
list_async(resource_group_name, name, expand:expand, custom_headers:custom_headers).value!
|
295
|
+
end
|
296
|
+
|
297
|
+
#
|
298
|
+
# The operation to get all extensions of a non-Azure machine
|
299
|
+
#
|
300
|
+
# @param resource_group_name [String] The name of the resource group.
|
301
|
+
# @param name [String] The name of the machine containing the extension.
|
302
|
+
# @param expand [String] The expand expression to apply on the operation.
|
303
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
304
|
+
# to the HTTP request.
|
305
|
+
#
|
306
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
307
|
+
#
|
308
|
+
def list_async(resource_group_name, name, expand:nil, custom_headers:nil)
|
309
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
310
|
+
fail ArgumentError, 'name is nil' if name.nil?
|
311
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
312
|
+
fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1
|
313
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
314
|
+
fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1
|
315
|
+
|
316
|
+
|
317
|
+
request_headers = {}
|
318
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
319
|
+
|
320
|
+
# Set Headers
|
321
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
322
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
323
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{name}/extensions'
|
324
|
+
|
325
|
+
request_url = @base_url || @client.base_url
|
326
|
+
|
327
|
+
options = {
|
328
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
329
|
+
path_params: {'resourceGroupName' => resource_group_name,'name' => name,'subscriptionId' => @client.subscription_id},
|
330
|
+
query_params: {'$expand' => expand,'api-version' => @client.api_version},
|
331
|
+
headers: request_headers.merge(custom_headers || {}),
|
332
|
+
base_url: request_url
|
333
|
+
}
|
334
|
+
promise = @client.make_request_async(:get, path_template, options)
|
335
|
+
|
336
|
+
promise = promise.then do |result|
|
337
|
+
http_response = result.response
|
338
|
+
status_code = http_response.status
|
339
|
+
response_content = http_response.body
|
340
|
+
unless status_code == 200
|
341
|
+
error_model = JSON.load(response_content)
|
342
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
343
|
+
end
|
344
|
+
|
345
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
346
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
347
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
348
|
+
# Deserialize Response
|
349
|
+
if status_code == 200
|
350
|
+
begin
|
351
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
352
|
+
result_mapper = Azure::HybridCompute::Mgmt::V2019_12_12::Models::MachineExtensionsListResult.mapper()
|
353
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
354
|
+
rescue Exception => e
|
355
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
356
|
+
end
|
357
|
+
end
|
358
|
+
|
359
|
+
result
|
360
|
+
end
|
361
|
+
|
362
|
+
promise.execute
|
363
|
+
end
|
364
|
+
|
365
|
+
#
|
366
|
+
# The operation to create or update the extension.
|
367
|
+
#
|
368
|
+
# @param resource_group_name [String] The name of the resource group.
|
369
|
+
# @param name [String] The name of the machine where the extension should be
|
370
|
+
# created or updated.
|
371
|
+
# @param extension_name [String] The name of the machine extension.
|
372
|
+
# @param extension_parameters [MachineExtension] Parameters supplied to the
|
373
|
+
# Create Machine Extension operation.
|
374
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
375
|
+
# will be added to the HTTP request.
|
376
|
+
#
|
377
|
+
# @return [MachineExtension] operation results.
|
378
|
+
#
|
379
|
+
def begin_create_or_update(resource_group_name, name, extension_name, extension_parameters, custom_headers:nil)
|
380
|
+
response = begin_create_or_update_async(resource_group_name, name, extension_name, extension_parameters, custom_headers:custom_headers).value!
|
381
|
+
response.body unless response.nil?
|
382
|
+
end
|
383
|
+
|
384
|
+
#
|
385
|
+
# The operation to create or update the extension.
|
386
|
+
#
|
387
|
+
# @param resource_group_name [String] The name of the resource group.
|
388
|
+
# @param name [String] The name of the machine where the extension should be
|
389
|
+
# created or updated.
|
390
|
+
# @param extension_name [String] The name of the machine extension.
|
391
|
+
# @param extension_parameters [MachineExtension] Parameters supplied to the
|
392
|
+
# Create Machine Extension operation.
|
393
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
394
|
+
# will be added to the HTTP request.
|
395
|
+
#
|
396
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
397
|
+
#
|
398
|
+
def begin_create_or_update_with_http_info(resource_group_name, name, extension_name, extension_parameters, custom_headers:nil)
|
399
|
+
begin_create_or_update_async(resource_group_name, name, extension_name, extension_parameters, custom_headers:custom_headers).value!
|
400
|
+
end
|
401
|
+
|
402
|
+
#
|
403
|
+
# The operation to create or update the extension.
|
404
|
+
#
|
405
|
+
# @param resource_group_name [String] The name of the resource group.
|
406
|
+
# @param name [String] The name of the machine where the extension should be
|
407
|
+
# created or updated.
|
408
|
+
# @param extension_name [String] The name of the machine extension.
|
409
|
+
# @param extension_parameters [MachineExtension] Parameters supplied to the
|
410
|
+
# Create Machine Extension operation.
|
411
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
412
|
+
# to the HTTP request.
|
413
|
+
#
|
414
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
415
|
+
#
|
416
|
+
def begin_create_or_update_async(resource_group_name, name, extension_name, extension_parameters, custom_headers:nil)
|
417
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
418
|
+
fail ArgumentError, 'name is nil' if name.nil?
|
419
|
+
fail ArgumentError, 'extension_name is nil' if extension_name.nil?
|
420
|
+
fail ArgumentError, 'extension_parameters is nil' if extension_parameters.nil?
|
421
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
422
|
+
fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1
|
423
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
424
|
+
fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1
|
425
|
+
|
426
|
+
|
427
|
+
request_headers = {}
|
428
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
429
|
+
|
430
|
+
# Set Headers
|
431
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
432
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
433
|
+
|
434
|
+
# Serialize Request
|
435
|
+
request_mapper = Azure::HybridCompute::Mgmt::V2019_12_12::Models::MachineExtension.mapper()
|
436
|
+
request_content = @client.serialize(request_mapper, extension_parameters)
|
437
|
+
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
438
|
+
|
439
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{name}/extensions/{extensionName}'
|
440
|
+
|
441
|
+
request_url = @base_url || @client.base_url
|
442
|
+
|
443
|
+
options = {
|
444
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
445
|
+
path_params: {'resourceGroupName' => resource_group_name,'name' => name,'extensionName' => extension_name,'subscriptionId' => @client.subscription_id},
|
446
|
+
query_params: {'api-version' => @client.api_version},
|
447
|
+
body: request_content,
|
448
|
+
headers: request_headers.merge(custom_headers || {}),
|
449
|
+
base_url: request_url
|
450
|
+
}
|
451
|
+
promise = @client.make_request_async(:put, path_template, options)
|
452
|
+
|
453
|
+
promise = promise.then do |result|
|
454
|
+
http_response = result.response
|
455
|
+
status_code = http_response.status
|
456
|
+
response_content = http_response.body
|
457
|
+
unless status_code == 200 || status_code == 202
|
458
|
+
error_model = JSON.load(response_content)
|
459
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
460
|
+
end
|
461
|
+
|
462
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
463
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
464
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
465
|
+
# Deserialize Response
|
466
|
+
if status_code == 200
|
467
|
+
begin
|
468
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
469
|
+
result_mapper = Azure::HybridCompute::Mgmt::V2019_12_12::Models::MachineExtension.mapper()
|
470
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
471
|
+
rescue Exception => e
|
472
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
473
|
+
end
|
474
|
+
end
|
475
|
+
|
476
|
+
result
|
477
|
+
end
|
478
|
+
|
479
|
+
promise.execute
|
480
|
+
end
|
481
|
+
|
482
|
+
#
|
483
|
+
# The operation to create or update the extension.
|
484
|
+
#
|
485
|
+
# @param resource_group_name [String] The name of the resource group.
|
486
|
+
# @param name [String] The name of the machine where the extension should be
|
487
|
+
# created or updated.
|
488
|
+
# @param extension_name [String] The name of the machine extension.
|
489
|
+
# @param extension_parameters [MachineExtensionUpdate] Parameters supplied to
|
490
|
+
# the Create Machine Extension operation.
|
491
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
492
|
+
# will be added to the HTTP request.
|
493
|
+
#
|
494
|
+
# @return [MachineExtension] operation results.
|
495
|
+
#
|
496
|
+
def begin_update(resource_group_name, name, extension_name, extension_parameters, custom_headers:nil)
|
497
|
+
response = begin_update_async(resource_group_name, name, extension_name, extension_parameters, custom_headers:custom_headers).value!
|
498
|
+
response.body unless response.nil?
|
499
|
+
end
|
500
|
+
|
501
|
+
#
|
502
|
+
# The operation to create or update the extension.
|
503
|
+
#
|
504
|
+
# @param resource_group_name [String] The name of the resource group.
|
505
|
+
# @param name [String] The name of the machine where the extension should be
|
506
|
+
# created or updated.
|
507
|
+
# @param extension_name [String] The name of the machine extension.
|
508
|
+
# @param extension_parameters [MachineExtensionUpdate] Parameters supplied to
|
509
|
+
# the Create Machine Extension operation.
|
510
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
511
|
+
# will be added to the HTTP request.
|
512
|
+
#
|
513
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
514
|
+
#
|
515
|
+
def begin_update_with_http_info(resource_group_name, name, extension_name, extension_parameters, custom_headers:nil)
|
516
|
+
begin_update_async(resource_group_name, name, extension_name, extension_parameters, custom_headers:custom_headers).value!
|
517
|
+
end
|
518
|
+
|
519
|
+
#
|
520
|
+
# The operation to create or update the extension.
|
521
|
+
#
|
522
|
+
# @param resource_group_name [String] The name of the resource group.
|
523
|
+
# @param name [String] The name of the machine where the extension should be
|
524
|
+
# created or updated.
|
525
|
+
# @param extension_name [String] The name of the machine extension.
|
526
|
+
# @param extension_parameters [MachineExtensionUpdate] Parameters supplied to
|
527
|
+
# the Create Machine Extension operation.
|
528
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
529
|
+
# to the HTTP request.
|
530
|
+
#
|
531
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
532
|
+
#
|
533
|
+
def begin_update_async(resource_group_name, name, extension_name, extension_parameters, custom_headers:nil)
|
534
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
535
|
+
fail ArgumentError, 'name is nil' if name.nil?
|
536
|
+
fail ArgumentError, 'extension_name is nil' if extension_name.nil?
|
537
|
+
fail ArgumentError, 'extension_parameters is nil' if extension_parameters.nil?
|
538
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
539
|
+
fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1
|
540
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
541
|
+
fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1
|
542
|
+
|
543
|
+
|
544
|
+
request_headers = {}
|
545
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
546
|
+
|
547
|
+
# Set Headers
|
548
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
549
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
550
|
+
|
551
|
+
# Serialize Request
|
552
|
+
request_mapper = Azure::HybridCompute::Mgmt::V2019_12_12::Models::MachineExtensionUpdate.mapper()
|
553
|
+
request_content = @client.serialize(request_mapper, extension_parameters)
|
554
|
+
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
555
|
+
|
556
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{name}/extensions/{extensionName}'
|
557
|
+
|
558
|
+
request_url = @base_url || @client.base_url
|
559
|
+
|
560
|
+
options = {
|
561
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
562
|
+
path_params: {'resourceGroupName' => resource_group_name,'name' => name,'extensionName' => extension_name,'subscriptionId' => @client.subscription_id},
|
563
|
+
query_params: {'api-version' => @client.api_version},
|
564
|
+
body: request_content,
|
565
|
+
headers: request_headers.merge(custom_headers || {}),
|
566
|
+
base_url: request_url
|
567
|
+
}
|
568
|
+
promise = @client.make_request_async(:patch, path_template, options)
|
569
|
+
|
570
|
+
promise = promise.then do |result|
|
571
|
+
http_response = result.response
|
572
|
+
status_code = http_response.status
|
573
|
+
response_content = http_response.body
|
574
|
+
unless status_code == 200 || status_code == 202
|
575
|
+
error_model = JSON.load(response_content)
|
576
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
577
|
+
end
|
578
|
+
|
579
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
580
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
581
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
582
|
+
# Deserialize Response
|
583
|
+
if status_code == 200
|
584
|
+
begin
|
585
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
586
|
+
result_mapper = Azure::HybridCompute::Mgmt::V2019_12_12::Models::MachineExtension.mapper()
|
587
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
588
|
+
rescue Exception => e
|
589
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
590
|
+
end
|
591
|
+
end
|
592
|
+
|
593
|
+
result
|
594
|
+
end
|
595
|
+
|
596
|
+
promise.execute
|
597
|
+
end
|
598
|
+
|
599
|
+
#
|
600
|
+
# The operation to delete the extension.
|
601
|
+
#
|
602
|
+
# @param resource_group_name [String] The name of the resource group.
|
603
|
+
# @param name [String] The name of the machine where the extension should be
|
604
|
+
# deleted.
|
605
|
+
# @param extension_name [String] The name of the machine extension.
|
606
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
607
|
+
# will be added to the HTTP request.
|
608
|
+
#
|
609
|
+
#
|
610
|
+
def begin_delete(resource_group_name, name, extension_name, custom_headers:nil)
|
611
|
+
response = begin_delete_async(resource_group_name, name, extension_name, custom_headers:custom_headers).value!
|
612
|
+
nil
|
613
|
+
end
|
614
|
+
|
615
|
+
#
|
616
|
+
# The operation to delete the extension.
|
617
|
+
#
|
618
|
+
# @param resource_group_name [String] The name of the resource group.
|
619
|
+
# @param name [String] The name of the machine where the extension should be
|
620
|
+
# deleted.
|
621
|
+
# @param extension_name [String] The name of the machine extension.
|
622
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
623
|
+
# will be added to the HTTP request.
|
624
|
+
#
|
625
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
626
|
+
#
|
627
|
+
def begin_delete_with_http_info(resource_group_name, name, extension_name, custom_headers:nil)
|
628
|
+
begin_delete_async(resource_group_name, name, extension_name, custom_headers:custom_headers).value!
|
629
|
+
end
|
630
|
+
|
631
|
+
#
|
632
|
+
# The operation to delete the extension.
|
633
|
+
#
|
634
|
+
# @param resource_group_name [String] The name of the resource group.
|
635
|
+
# @param name [String] The name of the machine where the extension should be
|
636
|
+
# deleted.
|
637
|
+
# @param extension_name [String] The name of the machine extension.
|
638
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
639
|
+
# to the HTTP request.
|
640
|
+
#
|
641
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
642
|
+
#
|
643
|
+
def begin_delete_async(resource_group_name, name, extension_name, custom_headers:nil)
|
644
|
+
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
|
645
|
+
fail ArgumentError, 'name is nil' if name.nil?
|
646
|
+
fail ArgumentError, 'extension_name is nil' if extension_name.nil?
|
647
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
648
|
+
fail ArgumentError, "'@client.api_version' should satisfy the constraint - 'MinLength': '1'" if !@client.api_version.nil? && @client.api_version.length < 1
|
649
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
650
|
+
fail ArgumentError, "'@client.subscription_id' should satisfy the constraint - 'MinLength': '1'" if !@client.subscription_id.nil? && @client.subscription_id.length < 1
|
651
|
+
|
652
|
+
|
653
|
+
request_headers = {}
|
654
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
655
|
+
|
656
|
+
# Set Headers
|
657
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
658
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
659
|
+
path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridCompute/machines/{name}/extensions/{extensionName}'
|
660
|
+
|
661
|
+
request_url = @base_url || @client.base_url
|
662
|
+
|
663
|
+
options = {
|
664
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
665
|
+
path_params: {'resourceGroupName' => resource_group_name,'name' => name,'extensionName' => extension_name,'subscriptionId' => @client.subscription_id},
|
666
|
+
query_params: {'api-version' => @client.api_version},
|
667
|
+
headers: request_headers.merge(custom_headers || {}),
|
668
|
+
base_url: request_url
|
669
|
+
}
|
670
|
+
promise = @client.make_request_async(:delete, path_template, options)
|
671
|
+
|
672
|
+
promise = promise.then do |result|
|
673
|
+
http_response = result.response
|
674
|
+
status_code = http_response.status
|
675
|
+
response_content = http_response.body
|
676
|
+
unless status_code == 200 || status_code == 202 || status_code == 204
|
677
|
+
error_model = JSON.load(response_content)
|
678
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
679
|
+
end
|
680
|
+
|
681
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
682
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
683
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
684
|
+
|
685
|
+
result
|
686
|
+
end
|
687
|
+
|
688
|
+
promise.execute
|
689
|
+
end
|
690
|
+
|
691
|
+
#
|
692
|
+
# The operation to get all extensions of a non-Azure machine
|
693
|
+
#
|
694
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
695
|
+
# to List operation.
|
696
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
697
|
+
# will be added to the HTTP request.
|
698
|
+
#
|
699
|
+
# @return [MachineExtensionsListResult] operation results.
|
700
|
+
#
|
701
|
+
def list_next(next_page_link, custom_headers:nil)
|
702
|
+
response = list_next_async(next_page_link, custom_headers:custom_headers).value!
|
703
|
+
response.body unless response.nil?
|
704
|
+
end
|
705
|
+
|
706
|
+
#
|
707
|
+
# The operation to get all extensions of a non-Azure machine
|
708
|
+
#
|
709
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
710
|
+
# to List operation.
|
711
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
712
|
+
# will be added to the HTTP request.
|
713
|
+
#
|
714
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
715
|
+
#
|
716
|
+
def list_next_with_http_info(next_page_link, custom_headers:nil)
|
717
|
+
list_next_async(next_page_link, custom_headers:custom_headers).value!
|
718
|
+
end
|
719
|
+
|
720
|
+
#
|
721
|
+
# The operation to get all extensions of a non-Azure machine
|
722
|
+
#
|
723
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
724
|
+
# to List operation.
|
725
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
726
|
+
# to the HTTP request.
|
727
|
+
#
|
728
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
729
|
+
#
|
730
|
+
def list_next_async(next_page_link, custom_headers:nil)
|
731
|
+
fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
|
732
|
+
|
733
|
+
|
734
|
+
request_headers = {}
|
735
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
736
|
+
|
737
|
+
# Set Headers
|
738
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
739
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
740
|
+
path_template = '{nextLink}'
|
741
|
+
|
742
|
+
request_url = @base_url || @client.base_url
|
743
|
+
|
744
|
+
options = {
|
745
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
746
|
+
skip_encoding_path_params: {'nextLink' => next_page_link},
|
747
|
+
headers: request_headers.merge(custom_headers || {}),
|
748
|
+
base_url: request_url
|
749
|
+
}
|
750
|
+
promise = @client.make_request_async(:get, path_template, options)
|
751
|
+
|
752
|
+
promise = promise.then do |result|
|
753
|
+
http_response = result.response
|
754
|
+
status_code = http_response.status
|
755
|
+
response_content = http_response.body
|
756
|
+
unless status_code == 200
|
757
|
+
error_model = JSON.load(response_content)
|
758
|
+
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
|
759
|
+
end
|
760
|
+
|
761
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
762
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
763
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
764
|
+
# Deserialize Response
|
765
|
+
if status_code == 200
|
766
|
+
begin
|
767
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
768
|
+
result_mapper = Azure::HybridCompute::Mgmt::V2019_12_12::Models::MachineExtensionsListResult.mapper()
|
769
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
770
|
+
rescue Exception => e
|
771
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
772
|
+
end
|
773
|
+
end
|
774
|
+
|
775
|
+
result
|
776
|
+
end
|
777
|
+
|
778
|
+
promise.execute
|
779
|
+
end
|
780
|
+
|
781
|
+
#
|
782
|
+
# The operation to get all extensions of a non-Azure machine
|
783
|
+
#
|
784
|
+
# @param resource_group_name [String] The name of the resource group.
|
785
|
+
# @param name [String] The name of the machine containing the extension.
|
786
|
+
# @param expand [String] The expand expression to apply on the operation.
|
787
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
788
|
+
# will be added to the HTTP request.
|
789
|
+
#
|
790
|
+
# @return [MachineExtensionsListResult] which provide lazy access to pages of
|
791
|
+
# the response.
|
792
|
+
#
|
793
|
+
def list_as_lazy(resource_group_name, name, expand:nil, custom_headers:nil)
|
794
|
+
response = list_async(resource_group_name, name, expand:expand, custom_headers:custom_headers).value!
|
795
|
+
unless response.nil?
|
796
|
+
page = response.body
|
797
|
+
page.next_method = Proc.new do |next_page_link|
|
798
|
+
list_next_async(next_page_link, custom_headers:custom_headers)
|
799
|
+
end
|
800
|
+
page
|
801
|
+
end
|
802
|
+
end
|
803
|
+
|
804
|
+
end
|
805
|
+
end
|