azure-mgmt-subscription/azure/mgmt/subscription/operations/subscription_factory_operations.py
def create_subscription(
            self, billing_account_name, invoice_section_name, body, custom_headers=None, raw=False, polling=True, **operation_config):
        """Creates an Azure subscription.

        :param billing_account_name: The name of the commerce root billing
         account.
        :type billing_account_name: str
        :param invoice_section_name: The name of the invoice section.
        :type invoice_section_name: str
        :param body: The subscription creation parameters.
        :type body:
         ~azure.mgmt.subscription.models.SubscriptionCreationParameters
        :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
         SubscriptionCreationResult or
         ClientRawResponse<SubscriptionCreationResult> if raw==True
        :rtype:
         ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.subscription.models.SubscriptionCreationResult]
         or
         ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.subscription.models.SubscriptionCreationResult]]
        :raises:
         :class:`ErrorResponseException<azure.mgmt.subscription.models.ErrorResponseException>`
        """
        raw_result = self._create_subscription_initial(
            billing_account_name=billing_account_name,
            invoice_section_name=invoice_section_name,
            body=body,
            custom_headers=custom_headers,
            raw=True,
            **operation_config
        )

        def get_long_running_output(response):
            header_dict = {
                'Location': 'str',
                'Retry-After': 'int',
            }
            deserialized = self._deserialize('SubscriptionCreationResult', response)

            if raw:
                client_raw_response = ClientRawResponse(deserialized, response)
                client_raw_response.add_headers(header_dict)
                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_subscription(
            self, billing_account_name, invoice_section_name, body, custom_headers=None, raw=False, polling=True, **operation_config):
        raw_result = self._create_subscription_initial(
            billing_account_name=billing_account_name,
            invoice_section_name=invoice_section_name,
            body=body,
            custom_headers=custom_headers,
            raw=True,
            **operation_config
        )

        def get_long_running_output(response):
            header_dict = {
                'Location': 'str',
                'Retry-After': 'int',
            }
            deserialized = self._deserialize('SubscriptionCreationResult', response)

            if raw:
                client_raw_response = ClientRawResponse(deserialized, response)
                client_raw_response.add_headers(header_dict)
                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_subscription ( self , billing_account_name , invoice_section_name , body , custom_headers = None , raw = False , polling = True , * * operation_config ) : raw_result = self . _create_subscription_initial ( billing_account_name = billing_account_name , invoice_section_name = invoice_section_name , body = body , custom_headers = custom_headers , raw = True , * * operation_config ) def get_long_running_output ( response ) : header_dict = { 'Location' : 'str' , 'Retry-After' : 'int' , } deserialized = self . _deserialize ( 'SubscriptionCreationResult' , response ) if raw : client_raw_response = ClientRawResponse ( deserialized , response ) client_raw_response . add_headers ( header_dict ) 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 an Azure subscription.

        :param billing_account_name: The name of the commerce root billing
         account.
        :type billing_account_name: str
        :param invoice_section_name: The name of the invoice section.
        :type invoice_section_name: str
        :param body: The subscription creation parameters.
        :type body:
         ~azure.mgmt.subscription.models.SubscriptionCreationParameters
        :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
         SubscriptionCreationResult or
         ClientRawResponse<SubscriptionCreationResult> if raw==True
        :rtype:
         ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.subscription.models.SubscriptionCreationResult]
         or
         ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.subscription.models.SubscriptionCreationResult]]
        :raises:
         :class:`ErrorResponseException<azure.mgmt.subscription.models.ErrorResponseException>`
Creates an Azure subscription .