def _start_os_upgrade_initial(self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any) -> None:
    cls = kwargs.pop('cls', None)
    error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError}
    error_map.update(kwargs.pop('error_map', {}))
    api_version = kwargs.pop('api_version', '2021-07-01')
    request = build_start_os_upgrade_request_initial(resource_group_name=resource_group_name, vm_scale_set_name=vm_scale_set_name, subscription_id=self._config.subscription_id, api_version=api_version, template_url=self._start_os_upgrade_initial.metadata['url'])
    request = _convert_request(request)
    request.url = self._client.format_url(request.url)
    pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
    response = pipeline_response.http_response
    if (response.status_code not in [200, 202]):
        map_error(status_code=response.status_code, response=response, error_map=error_map)
        raise HttpResponseError(response=response, error_format=ARMErrorFormat)
    if cls:
        return cls(pipeline_response, None, {})
def _start_os_upgrade_initial(self, resource_group_name: str, vm_scale_set_name: str, **kwargs: Any) -> None:
    cls = kwargs.pop('cls', None)
    error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError}
    error_map.update(kwargs.pop('error_map', {}))
    api_version = kwargs.pop('api_version', '2021-07-01')
    request = build_start_os_upgrade_request_initial(resource_group_name=resource_group_name, vm_scale_set_name=vm_scale_set_name, subscription_id=self._config.subscription_id, api_version=api_version, template_url=self._start_os_upgrade_initial.metadata['url'])
    request = _convert_request(request)
    request.url = self._client.format_url(request.url)
    pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
    response = pipeline_response.http_response
    if (response.status_code not in [200, 202]):
        map_error(status_code=response.status_code, response=response, error_map=error_map)
        raise HttpResponseError(response=response, error_format=ARMErrorFormat)
    if cls:
        return cls(pipeline_response, None, {})