diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/__init__.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/__init__.py index 925ba8a919ba..49023b7c7b9f 100644 --- a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/__init__.py +++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/__init__.py @@ -98,6 +98,7 @@ from .update_resource_py3 import UpdateResource from .sub_resource_read_only_py3 import SubResourceReadOnly from .operation_status_response_py3 import OperationStatusResponse + from .in_guest_software_item_py3 import InGuestSoftwareItem from .resource_update_py3 import ResourceUpdate from .image_disk_reference_py3 import ImageDiskReference from .creation_data_py3 import CreationData @@ -200,6 +201,7 @@ from .update_resource import UpdateResource from .sub_resource_read_only import SubResourceReadOnly from .operation_status_response import OperationStatusResponse + from .in_guest_software_item import InGuestSoftwareItem from .resource_update import ResourceUpdate from .image_disk_reference import ImageDiskReference from .creation_data import CreationData @@ -216,6 +218,7 @@ from .availability_set_paged import AvailabilitySetPaged from .virtual_machine_size_paged import VirtualMachineSizePaged from .virtual_machine_paged import VirtualMachinePaged +from .in_guest_software_item_paged import InGuestSoftwareItemPaged from .usage_paged import UsagePaged from .image_paged import ImagePaged from .virtual_machine_scale_set_paged import VirtualMachineScaleSetPaged @@ -332,6 +335,7 @@ 'UpdateResource', 'SubResourceReadOnly', 'OperationStatusResponse', + 'InGuestSoftwareItem', 'ResourceUpdate', 'ImageDiskReference', 'CreationData', @@ -348,6 +352,7 @@ 'AvailabilitySetPaged', 'VirtualMachineSizePaged', 'VirtualMachinePaged', + 'InGuestSoftwareItemPaged', 'UsagePaged', 'ImagePaged', 'VirtualMachineScaleSetPaged', diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/in_guest_software_item.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/in_guest_software_item.py new file mode 100644 index 000000000000..ef74423d93f5 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/in_guest_software_item.py @@ -0,0 +1,66 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource import Resource + + +class InGuestSoftwareItem(Resource): + """Describes a InGuest software item. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :ivar in_guest_software_item_name: Specifies the name of the software. + :vartype in_guest_software_item_name: str + :ivar version: Specifies the version of the software. + :vartype version: str + :ivar publisher: Specifies the publisher of the software. + :vartype publisher: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'in_guest_software_item_name': {'readonly': True}, + 'version': {'readonly': True}, + 'publisher': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'in_guest_software_item_name': {'key': 'properties.name', 'type': 'str'}, + 'version': {'key': 'properties.version', 'type': 'str'}, + 'publisher': {'key': 'properties.publisher', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(InGuestSoftwareItem, self).__init__(**kwargs) + self.in_guest_software_item_name = None + self.version = None + self.publisher = None diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/in_guest_software_item_paged.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/in_guest_software_item_paged.py new file mode 100644 index 000000000000..4c5f9b0b1534 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/in_guest_software_item_paged.py @@ -0,0 +1,27 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.paging import Paged + + +class InGuestSoftwareItemPaged(Paged): + """ + A paging container for iterating over a list of :class:`InGuestSoftwareItem ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[InGuestSoftwareItem]'} + } + + def __init__(self, *args, **kwargs): + + super(InGuestSoftwareItemPaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/in_guest_software_item_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/in_guest_software_item_py3.py new file mode 100644 index 000000000000..ee596f35b42f --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/in_guest_software_item_py3.py @@ -0,0 +1,66 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource_py3 import Resource + + +class InGuestSoftwareItem(Resource): + """Describes a InGuest software item. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :ivar in_guest_software_item_name: Specifies the name of the software. + :vartype in_guest_software_item_name: str + :ivar version: Specifies the version of the software. + :vartype version: str + :ivar publisher: Specifies the publisher of the software. + :vartype publisher: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'in_guest_software_item_name': {'readonly': True}, + 'version': {'readonly': True}, + 'publisher': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'in_guest_software_item_name': {'key': 'properties.name', 'type': 'str'}, + 'version': {'key': 'properties.version', 'type': 'str'}, + 'publisher': {'key': 'properties.publisher', 'type': 'str'}, + } + + def __init__(self, *, location: str, tags=None, **kwargs) -> None: + super(InGuestSoftwareItem, self).__init__(location=location, tags=tags, **kwargs) + self.in_guest_software_item_name = None + self.version = None + self.publisher = None diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/operations/virtual_machines_operations.py b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/operations/virtual_machines_operations.py index 4bd60de1201d..a7d5301028e8 100644 --- a/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/operations/virtual_machines_operations.py +++ b/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/operations/virtual_machines_operations.py @@ -1310,3 +1310,142 @@ def get_long_running_output(response): else: polling_method = polling return LROPoller(self._client, raw_result, get_long_running_output, polling_method) redeploy.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/redeploy'} + + def list_in_guest_software_items( + self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): + """Lists all of the In-Guest software items of virtual machines in the + specified subscription. Use the nextLink property in the response to + get the next page of items. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine. + :type vm_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of InGuestSoftwareItem + :rtype: + ~azure.mgmt.compute.v2016_04_30_preview.models.InGuestSoftwareItemPaged[~azure.mgmt.compute.v2016_04_30_preview.models.InGuestSoftwareItem] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list_in_guest_software_items.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.InGuestSoftwareItemPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.InGuestSoftwareItemPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list_in_guest_software_items.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/guestResourceTypes/software/items'} + + def get_in_guest_software_item( + self, resource_group_name, vm_name, item_id, custom_headers=None, raw=False, **operation_config): + """Get the In-Guest software item of the virtual machine in the specified + subscription. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine. + :type vm_name: str + :param item_id: Identifier of the In-Guest resource type. + :type item_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: InGuestSoftwareItem or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.compute.v2016_04_30_preview.models.InGuestSoftwareItem or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_in_guest_software_item.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'itemId': self._serialize.url("item_id", item_id, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('InGuestSoftwareItem', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_in_guest_software_item.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/guestResourceTypes/software/items/{itemId}'} diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/__init__.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/__init__.py index d9f30207ad02..6f5546b37dd1 100644 --- a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/__init__.py +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/__init__.py @@ -135,6 +135,7 @@ from .log_analytics_input_base_py3 import LogAnalyticsInputBase from .log_analytics_output_py3 import LogAnalyticsOutput from .log_analytics_operation_result_py3 import LogAnalyticsOperationResult + from .in_guest_software_item_py3 import InGuestSoftwareItem from .run_command_input_parameter_py3 import RunCommandInputParameter from .run_command_input_py3 import RunCommandInput from .run_command_parameter_definition_py3 import RunCommandParameterDefinition @@ -267,6 +268,7 @@ from .log_analytics_input_base import LogAnalyticsInputBase from .log_analytics_output import LogAnalyticsOutput from .log_analytics_operation_result import LogAnalyticsOperationResult + from .in_guest_software_item import InGuestSoftwareItem from .run_command_input_parameter import RunCommandInputParameter from .run_command_input import RunCommandInput from .run_command_parameter_definition import RunCommandParameterDefinition @@ -278,6 +280,7 @@ from .virtual_machine_size_paged import VirtualMachineSizePaged from .usage_paged import UsagePaged from .virtual_machine_paged import VirtualMachinePaged +from .in_guest_software_item_paged import InGuestSoftwareItemPaged from .image_paged import ImagePaged from .virtual_machine_scale_set_paged import VirtualMachineScaleSetPaged from .virtual_machine_scale_set_sku_paged import VirtualMachineScaleSetSkuPaged @@ -440,6 +443,7 @@ 'LogAnalyticsInputBase', 'LogAnalyticsOutput', 'LogAnalyticsOperationResult', + 'InGuestSoftwareItem', 'RunCommandInputParameter', 'RunCommandInput', 'RunCommandParameterDefinition', @@ -451,6 +455,7 @@ 'VirtualMachineSizePaged', 'UsagePaged', 'VirtualMachinePaged', + 'InGuestSoftwareItemPaged', 'ImagePaged', 'VirtualMachineScaleSetPaged', 'VirtualMachineScaleSetSkuPaged', diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/in_guest_software_item.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/in_guest_software_item.py new file mode 100644 index 000000000000..ef74423d93f5 --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/in_guest_software_item.py @@ -0,0 +1,66 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource import Resource + + +class InGuestSoftwareItem(Resource): + """Describes a InGuest software item. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :ivar in_guest_software_item_name: Specifies the name of the software. + :vartype in_guest_software_item_name: str + :ivar version: Specifies the version of the software. + :vartype version: str + :ivar publisher: Specifies the publisher of the software. + :vartype publisher: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'in_guest_software_item_name': {'readonly': True}, + 'version': {'readonly': True}, + 'publisher': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'in_guest_software_item_name': {'key': 'properties.name', 'type': 'str'}, + 'version': {'key': 'properties.version', 'type': 'str'}, + 'publisher': {'key': 'properties.publisher', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(InGuestSoftwareItem, self).__init__(**kwargs) + self.in_guest_software_item_name = None + self.version = None + self.publisher = None diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/in_guest_software_item_paged.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/in_guest_software_item_paged.py new file mode 100644 index 000000000000..b4c28a6e23ab --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/in_guest_software_item_paged.py @@ -0,0 +1,27 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.paging import Paged + + +class InGuestSoftwareItemPaged(Paged): + """ + A paging container for iterating over a list of :class:`InGuestSoftwareItem ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[InGuestSoftwareItem]'} + } + + def __init__(self, *args, **kwargs): + + super(InGuestSoftwareItemPaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/in_guest_software_item_py3.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/in_guest_software_item_py3.py new file mode 100644 index 000000000000..ee596f35b42f --- /dev/null +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/models/in_guest_software_item_py3.py @@ -0,0 +1,66 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource_py3 import Resource + + +class InGuestSoftwareItem(Resource): + """Describes a InGuest software item. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Required. Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :ivar in_guest_software_item_name: Specifies the name of the software. + :vartype in_guest_software_item_name: str + :ivar version: Specifies the version of the software. + :vartype version: str + :ivar publisher: Specifies the publisher of the software. + :vartype publisher: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'in_guest_software_item_name': {'readonly': True}, + 'version': {'readonly': True}, + 'publisher': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'in_guest_software_item_name': {'key': 'properties.name', 'type': 'str'}, + 'version': {'key': 'properties.version', 'type': 'str'}, + 'publisher': {'key': 'properties.publisher', 'type': 'str'}, + } + + def __init__(self, *, location: str, tags=None, **kwargs) -> None: + super(InGuestSoftwareItem, self).__init__(location=location, tags=tags, **kwargs) + self.in_guest_software_item_name = None + self.version = None + self.publisher = None diff --git a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/operations/virtual_machines_operations.py b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/operations/virtual_machines_operations.py index 009c54f350e3..5c3536cd159b 100644 --- a/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/operations/virtual_machines_operations.py +++ b/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/operations/virtual_machines_operations.py @@ -1449,6 +1449,144 @@ def get_long_running_output(response): return LROPoller(self._client, raw_result, get_long_running_output, polling_method) perform_maintenance.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/performMaintenance'} + def list_in_guest_software_items( + self, resource_group_name, vm_name, custom_headers=None, raw=False, **operation_config): + """Lists all of the In-Guest software items of virtual machines in the + specified subscription. Use the nextLink property in the response to + get the next page of items. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine. + :type vm_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of InGuestSoftwareItem + :rtype: + ~azure.mgmt.compute.v2018_10_01.models.InGuestSoftwareItemPaged[~azure.mgmt.compute.v2018_10_01.models.InGuestSoftwareItem] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list_in_guest_software_items.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.InGuestSoftwareItemPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.InGuestSoftwareItemPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list_in_guest_software_items.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/guestResourceTypes/software/items'} + + def get_in_guest_software_item( + self, resource_group_name, vm_name, item_id, custom_headers=None, raw=False, **operation_config): + """Get the In-Guest software item of the virtual machine in the specified + subscription. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param vm_name: The name of the virtual machine. + :type vm_name: str + :param item_id: Identifier of the In-Guest resource type. + :type item_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: InGuestSoftwareItem or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.compute.v2018_10_01.models.InGuestSoftwareItem or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_in_guest_software_item.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vmName': self._serialize.url("vm_name", vm_name, 'str'), + 'itemId': self._serialize.url("item_id", item_id, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('InGuestSoftwareItem', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_in_guest_software_item.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/guestResourceTypes/software/items/{itemId}'} + def _run_command_initial( self, resource_group_name, vm_name, parameters, custom_headers=None, raw=False, **operation_config):