def create_or_update(<EOL>self, parameters, group_name, service_name, custom_headers=None, raw=False, polling=True, **operation_config):
raw_result = self._create_or_update_initial(<EOL>parameters=parameters,<EOL>group_name=group_name,<EOL>service_name=service_name,<EOL>custom_headers=custom_headers,<EOL>raw=True,<EOL>**operation_config<EOL>)<EOL>def get_long_running_output(response):<EOL><INDENT>deserialized = self._deserialize('<STR_LIT>', response)<EOL>if raw:<EOL><INDENT>client_raw_response = ClientRawResponse(deserialized, response)<EOL>return client_raw_response<EOL><DEDENT>return deserialized<EOL><DEDENT>lro_delay = operation_config.get(<EOL>'<STR_LIT>',<EOL>self.config.long_running_operation_timeout)<EOL>if polling is True: polling_method = ARMPolling(lro_delay, **operation_config)<EOL>elif polling is False: polling_method = NoPolling()<EOL>else: polling_method = polling<EOL>return LROPoller(self._client, raw_result, get_long_running_output, polling_method)<EOL>
Create or update DMS Instance.

        The services resource is the top-level resource that represents the
        Database Migration Service. The PUT method creates a new service or
        updates an existing one. When a service is updated, existing child
        resources (i.e. tasks) are unaffected. Services currently support a
        single kind, "vm", which refers to a VM-based service, although other
        kinds may be added in the future. This method can change the kind, SKU,
        and network of the service, but if tasks are currently running (i.e.
        the service is busy), this will fail with 400 Bad Request
        ("ServiceIsBusy"). The provider will reply when successful with 200 OK
        or 201 Created. Long-running operations use the provisioningState
        property.

        :param parameters: Information about the service
        :type parameters:
         ~azure.mgmt.datamigration.models.DataMigrationService
        :param group_name: Name of the resource group
        :type group_name: str
        :param service_name: Name of the service
        :type service_name: str
        :param dict custom_headers: headers that will be added to the request
        :param bool raw: The poller return type is ClientRawResponse, the
         direct response alongside the deserialized response
        :param polling: True for ARMPolling, False for no polling, or a
         polling object for personal polling strategy
        :return: An instance of LROPoller that returns DataMigrationService or
         ClientRawResponse<DataMigrationService> if raw==True
        :rtype:
         ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.datamigration.models.DataMigrationService]
         or
         ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.datamigration.models.DataMigrationService]]
        :raises:
         :class:`ApiErrorException<azure.mgmt.datamigration.models.ApiErrorException>`