original_docstring: Creates or updates the server's vulnerability assessment. Learn more about setting SQL
          vulnerability assessment with managed identity -
          https://docs.microsoft.com/azure/azure-sql/database/sql-database-vulnerability-assessment-storage.
  
          :param resource_group_name: The name of the resource group that contains the resource. You can
           obtain this value from the Azure Resource Manager API or the portal.
          :type resource_group_name: str
          :param server_name: The name of the server for which the vulnerability assessment is defined.
          :type server_name: str
          :param vulnerability_assessment_name: The name of the vulnerability assessment.
          :type vulnerability_assessment_name: str or ~azure.mgmt.sql.models.VulnerabilityAssessmentName
          :param parameters: The requested resource.
          :type parameters: ~azure.mgmt.sql.models.ServerVulnerabilityAssessment
          :keyword callable cls: A custom type or function that will be passed the direct response
          :return: ServerVulnerabilityAssessment, or the result of cls(response)
          :rtype: ~azure.mgmt.sql.models.ServerVulnerabilityAssessment
          :raises: ~azure.core.exceptions.HttpResponseError
          
docstring: Creates or updates the server's vulnerability assessment.
docstring_tokens: Creates or updates the server ' s vulnerability assessment .
code: async def create_or_update(
          self,
          resource_group_name: str,
          server_name: str,
          vulnerability_assessment_name: Union[str, "_models.VulnerabilityAssessmentName"],
          parameters: "_models.ServerVulnerabilityAssessment",
          **kwargs: Any
      ) -> "_models.ServerVulnerabilityAssessment":
          """Creates or updates the server's vulnerability assessment. Learn more about setting SQL
          vulnerability assessment with managed identity -
          https://docs.microsoft.com/azure/azure-sql/database/sql-database-vulnerability-assessment-storage.
  
          :param resource_group_name: The name of the resource group that contains the resource. You can
           obtain this value from the Azure Resource Manager API or the portal.
          :type resource_group_name: str
          :param server_name: The name of the server for which the vulnerability assessment is defined.
          :type server_name: str
          :param vulnerability_assessment_name: The name of the vulnerability assessment.
          :type vulnerability_assessment_name: str or ~azure.mgmt.sql.models.VulnerabilityAssessmentName
          :param parameters: The requested resource.
          :type parameters: ~azure.mgmt.sql.models.ServerVulnerabilityAssessment
          :keyword callable cls: A custom type or function that will be passed the direct response
          :return: ServerVulnerabilityAssessment, or the result of cls(response)
          :rtype: ~azure.mgmt.sql.models.ServerVulnerabilityAssessment
          :raises: ~azure.core.exceptions.HttpResponseError
          """
          cls = kwargs.pop('cls', None)  # type: ClsType["_models.ServerVulnerabilityAssessment"]
          error_map = {
              401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
          }
          error_map.update(kwargs.pop('error_map', {}))
  
          content_type = kwargs.pop('content_type', "application/json")  # type: Optional[str]
  
          _json = self._serialize.body(parameters, 'ServerVulnerabilityAssessment')
  
          request = build_create_or_update_request(
              resource_group_name=resource_group_name,
              server_name=server_name,
              vulnerability_assessment_name=vulnerability_assessment_name,
              subscription_id=self._config.subscription_id,
              content_type=content_type,
              json=_json,
              template_url=self.create_or_update.metadata['url'],
          )
          request = _convert_request(request)
          request.url = self._client.format_url(request.url)
  
          pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
          response = pipeline_response.http_response
  
          if response.status_code not in [200, 201]:
              map_error(status_code=response.status_code, response=response, error_map=error_map)
              raise HttpResponseError(response=response, error_format=ARMErrorFormat)
  
          if response.status_code == 200:
              deserialized = self._deserialize('ServerVulnerabilityAssessment', pipeline_response)
  
          if response.status_code == 201:
              deserialized = self._deserialize('ServerVulnerabilityAssessment', pipeline_response)
  
          if cls:
              return cls(pipeline_response, deserialized, {})
  
          return deserialized
code_tokens: async def create_or_update ( self , resource_group_name : str , server_name : str , vulnerability_assessment_name : Union [ str , "_models.VulnerabilityAssessmentName" ] , parameters : "_models.ServerVulnerabilityAssessment" , ** kwargs : Any ) -> "_models.ServerVulnerabilityAssessment" : cls = kwargs . pop ( 'cls' , None ) error_map = { 401 : ClientAuthenticationError , 404 : ResourceNotFoundError , 409 : ResourceExistsError } error_map . update ( kwargs . pop ( 'error_map' , { } ) ) content_type = kwargs . pop ( 'content_type' , "application/json" ) _json = self . _serialize . body ( parameters , 'ServerVulnerabilityAssessment' ) request = build_create_or_update_request ( resource_group_name = resource_group_name , server_name = server_name , vulnerability_assessment_name = vulnerability_assessment_name , subscription_id = self . _config . subscription_id , content_type = content_type , json = _json , template_url = self . create_or_update . metadata [ 'url' ] , ) request = _convert_request ( request ) request . url = self . _client . format_url ( request . url ) pipeline_response = await self . _client . _pipeline . run ( request , stream = False , ** kwargs ) response = pipeline_response . http_response if response . status_code not in [ 200 , 201 ] : map_error ( status_code = response . status_code , response = response , error_map = error_map ) raise HttpResponseError ( response = response , error_format = ARMErrorFormat ) if response . status_code == 200 : deserialized = self . _deserialize ( 'ServerVulnerabilityAssessment' , pipeline_response ) if response . status_code == 201 : deserialized = self . _deserialize ( 'ServerVulnerabilityAssessment' , pipeline_response ) if cls : return cls ( pipeline_response , deserialized , { } ) return deserialized
short_docstring: Creates or updates the server's vulnerability assessment.
short_docstring_tokens: Creates or updates the server ' s vulnerability assessment .
comment: """Creates or updates the server's vulnerability assessment. Learn more about setting SQL
          vulnerability assessment with managed identity -
          https://docs.microsoft.com/azure/azure-sql/database/sql-database-vulnerability-assessment-storage.
  
          :param resource_group_name: The name of the resource group that contains the resource. You can
           obtain this value from the Azure Resource Manager API or the portal.
          :type resource_group_name: str
          :param server_name: The name of the server for which the vulnerability assessment is defined.
          :type server_name: str
          :param vulnerability_assessment_name: The name of the vulnerability assessment.
          :type vulnerability_assessment_name: str or ~azure.mgmt.sql.models.VulnerabilityAssessmentName
          :param parameters: The requested resource.
          :type parameters: ~azure.mgmt.sql.models.ServerVulnerabilityAssessment
          :keyword callable cls: A custom type or function that will be passed the direct response
          :return: ServerVulnerabilityAssessment, or the result of cls(response)
          :rtype: ~azure.mgmt.sql.models.ServerVulnerabilityAssessment
          :raises: ~azure.core.exceptions.HttpResponseError
          """$SEP$# type: ClsType["_models.ServerVulnerabilityAssessment"]$SEP$# type: Optional[str]