azure-mgmt-servermanager/azure/mgmt/servermanager/operations/session_operations.py
def create(
            self, resource_group_name, node_name, session, user_name=None, password=None, retention_period=None, credential_data_format=None, encryption_certificate_thumbprint=None, custom_headers=None, raw=False, polling=True, **operation_config):
        """Creates a session for a node.

        :param resource_group_name: The resource group name uniquely
         identifies the resource group within the user subscriptionId.
        :type resource_group_name: str
        :param node_name: The node name (256 characters maximum).
        :type node_name: str
        :param session: The sessionId from the user.
        :type session: str
        :param user_name: Encrypted User name to be used to connect to node.
        :type user_name: str
        :param password: Encrypted Password associated with user name.
        :type password: str
        :param retention_period: Session retention period. Possible values
         include: 'Session', 'Persistent'
        :type retention_period: str or
         ~azure.mgmt.servermanager.models.RetentionPeriod
        :param credential_data_format: Credential data format. Possible values
         include: 'RsaEncrypted'
        :type credential_data_format: str or
         ~azure.mgmt.servermanager.models.CredentialDataFormat
        :param encryption_certificate_thumbprint: Encryption certificate
         thumbprint.
        :type encryption_certificate_thumbprint: 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 SessionResource or
         ClientRawResponse<SessionResource> if raw==True
        :rtype:
         ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.servermanager.models.SessionResource]
         or
         ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.servermanager.models.SessionResource]]
        :raises:
         :class:`ErrorException<azure.mgmt.servermanager.models.ErrorException>`
        """
        raw_result = self._create_initial(
            resource_group_name=resource_group_name,
            node_name=node_name,
            session=session,
            user_name=user_name,
            password=password,
            retention_period=retention_period,
            credential_data_format=credential_data_format,
            encryption_certificate_thumbprint=encryption_certificate_thumbprint,
            custom_headers=custom_headers,
            raw=True,
            **operation_config
        )

        def get_long_running_output(response):
            deserialized = self._deserialize('SessionResource', response)

            if raw:
                client_raw_response = ClientRawResponse(deserialized, response)
                return client_raw_response

            return deserialized

        lro_delay = operation_config.get(
            'long_running_operation_timeout',
            self.config.long_running_operation_timeout)
        if polling is True: polling_method = ARMPolling(lro_delay, **operation_config)
        elif polling is False: polling_method = NoPolling()
        else: polling_method = polling
        return LROPoller(self._client, raw_result, get_long_running_output, polling_method)
def create(
            self, resource_group_name, node_name, session, user_name=None, password=None, retention_period=None, credential_data_format=None, encryption_certificate_thumbprint=None, custom_headers=None, raw=False, polling=True, **operation_config):
        raw_result = self._create_initial(
            resource_group_name=resource_group_name,
            node_name=node_name,
            session=session,
            user_name=user_name,
            password=password,
            retention_period=retention_period,
            credential_data_format=credential_data_format,
            encryption_certificate_thumbprint=encryption_certificate_thumbprint,
            custom_headers=custom_headers,
            raw=True,
            **operation_config
        )

        def get_long_running_output(response):
            deserialized = self._deserialize('SessionResource', response)

            if raw:
                client_raw_response = ClientRawResponse(deserialized, response)
                return client_raw_response

            return deserialized

        lro_delay = operation_config.get(
            'long_running_operation_timeout',
            self.config.long_running_operation_timeout)
        if polling is True: polling_method = ARMPolling(lro_delay, **operation_config)
        elif polling is False: polling_method = NoPolling()
        else: polling_method = polling
        return LROPoller(self._client, raw_result, get_long_running_output, polling_method)
def create ( self , resource_group_name , node_name , session , user_name = None , password = None , retention_period = None , credential_data_format = None , encryption_certificate_thumbprint = None , custom_headers = None , raw = False , polling = True , * * operation_config ) : raw_result = self . _create_initial ( resource_group_name = resource_group_name , node_name = node_name , session = session , user_name = user_name , password = password , retention_period = retention_period , credential_data_format = credential_data_format , encryption_certificate_thumbprint = encryption_certificate_thumbprint , custom_headers = custom_headers , raw = True , * * operation_config ) def get_long_running_output ( response ) : deserialized = self . _deserialize ( 'SessionResource' , response ) if raw : client_raw_response = ClientRawResponse ( deserialized , response ) return client_raw_response return deserialized lro_delay = operation_config . get ( 'long_running_operation_timeout' , self . config . long_running_operation_timeout ) if polling is True : polling_method = ARMPolling ( lro_delay , * * operation_config ) elif polling is False : polling_method = NoPolling ( ) else : polling_method = polling return LROPoller ( self . _client , raw_result , get_long_running_output , polling_method )
Creates a session for a node.

        :param resource_group_name: The resource group name uniquely
         identifies the resource group within the user subscriptionId.
        :type resource_group_name: str
        :param node_name: The node name (256 characters maximum).
        :type node_name: str
        :param session: The sessionId from the user.
        :type session: str
        :param user_name: Encrypted User name to be used to connect to node.
        :type user_name: str
        :param password: Encrypted Password associated with user name.
        :type password: str
        :param retention_period: Session retention period. Possible values
         include: 'Session', 'Persistent'
        :type retention_period: str or
         ~azure.mgmt.servermanager.models.RetentionPeriod
        :param credential_data_format: Credential data format. Possible values
         include: 'RsaEncrypted'
        :type credential_data_format: str or
         ~azure.mgmt.servermanager.models.CredentialDataFormat
        :param encryption_certificate_thumbprint: Encryption certificate
         thumbprint.
        :type encryption_certificate_thumbprint: 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 SessionResource or
         ClientRawResponse<SessionResource> if raw==True
        :rtype:
         ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.servermanager.models.SessionResource]
         or
         ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.servermanager.models.SessionResource]]
        :raises:
         :class:`ErrorException<azure.mgmt.servermanager.models.ErrorException>`
Creates a session for a node .