azure-mgmt-eventhub/azure/mgmt/eventhub/operations/namespaces_operations.py
def create_or_update(
            self, resource_group_name, namespace_name, parameters, custom_headers=None, raw=False, **operation_config):
        """Creates or updates a namespace. Once created, this namespace's resource
        manifest is immutable. This operation is idempotent.

        :param resource_group_name: Name of the resource group within the
         azure subscription.
        :type resource_group_name: str
        :param namespace_name: The Namespace name
        :type namespace_name: str
        :param parameters: Parameters for creating a namespace resource.
        :type parameters: ~azure.mgmt.eventhub.models.EHNamespace
        :param dict custom_headers: headers that will be added to the request
        :param bool raw: returns the direct response alongside the
         deserialized response
        :return: An instance of AzureOperationPoller that returns EHNamespace
         or ClientRawResponse if raw=true
        :rtype:
         ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.eventhub.models.EHNamespace]
         or ~msrest.pipeline.ClientRawResponse
        :raises:
         :class:`ErrorResponseException<azure.mgmt.eventhub.models.ErrorResponseException>`
        """
        raw_result = self._create_or_update_initial(
            resource_group_name=resource_group_name,
            namespace_name=namespace_name,
            parameters=parameters,
            custom_headers=custom_headers,
            raw=True,
            **operation_config
        )
        if raw:
            return raw_result

        # Construct and send request
        def long_running_send():
            return raw_result.response

        def get_long_running_status(status_link, headers=None):

            request = self._client.get(status_link)
            if headers:
                request.headers.update(headers)
            header_parameters = {}
            header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id']
            return self._client.send(
                request, header_parameters, stream=False, **operation_config)

        def get_long_running_output(response):

            if response.status_code not in [200, 201, 202]:
                raise models.ErrorResponseException(self._deserialize, response)

            deserialized = self._deserialize('EHNamespace', response)

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

            return deserialized

        long_running_operation_timeout = operation_config.get(
            'long_running_operation_timeout',
            self.config.long_running_operation_timeout)
        return AzureOperationPoller(
            long_running_send, get_long_running_output,
            get_long_running_status, long_running_operation_timeout)
Creates or updates a namespace. Once created, this namespace's resource
        manifest is immutable. This operation is idempotent.

        :param resource_group_name: Name of the resource group within the
         azure subscription.
        :type resource_group_name: str
        :param namespace_name: The Namespace name
        :type namespace_name: str
        :param parameters: Parameters for creating a namespace resource.
        :type parameters: ~azure.mgmt.eventhub.models.EHNamespace
        :param dict custom_headers: headers that will be added to the request
        :param bool raw: returns the direct response alongside the
         deserialized response
        :return: An instance of AzureOperationPoller that returns EHNamespace
         or ClientRawResponse if raw=true
        :rtype:
         ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.eventhub.models.EHNamespace]
         or ~msrest.pipeline.ClientRawResponse
        :raises:
         :class:`ErrorResponseException<azure.mgmt.eventhub.models.ErrorResponseException>`
        
Creates or updates a namespace. Once created, this namespace's resource
manifest is immutable. This operation is idempotent.
Creates or updates a namespace . Once created this namespace ' s resource manifest is immutable . This operation is idempotent .
def create_or_update(
            self, resource_group_name, namespace_name, parameters, custom_headers=None, raw=False, **operation_config):
        raw_result = self._create_or_update_initial(
            resource_group_name=resource_group_name,
            namespace_name=namespace_name,
            parameters=parameters,
            custom_headers=custom_headers,
            raw=True,
            **operation_config
        )
        if raw:
            return raw_result
        def long_running_send():
            return raw_result.response
        def get_long_running_status(status_link, headers=None):
            request = self._client.get(status_link)
            if headers:
                request.headers.update(headers)
            header_parameters = {}
            header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id']
            return self._client.send(
                request, header_parameters, stream=False, **operation_config)
        def get_long_running_output(response):
            if response.status_code not in [200, 201, 202]:
                raise models.ErrorResponseException(self._deserialize, response)
            deserialized = self._deserialize('EHNamespace', response)
            if raw:
                client_raw_response = ClientRawResponse(deserialized, response)
                return client_raw_response
            return deserialized
        long_running_operation_timeout = operation_config.get(
            'long_running_operation_timeout',
            self.config.long_running_operation_timeout)
        return AzureOperationPoller(
            long_running_send, get_long_running_output,
            get_long_running_status, long_running_operation_timeout)
def create_or_update ( self , resource_group_name , namespace_name , parameters , custom_headers = None , raw = False , ** operation_config ) : raw_result = self . _create_or_update_initial ( resource_group_name = resource_group_name , namespace_name = namespace_name , parameters = parameters , custom_headers = custom_headers , raw = True , ** operation_config ) if raw : return raw_result def long_running_send ( ) : return raw_result . response def get_long_running_status ( status_link , headers = None ) : request = self . _client . get ( status_link ) if headers : request . headers . update ( headers ) header_parameters = { } header_parameters [ 'x-ms-client-request-id' ] = raw_result . response . request . headers [ 'x-ms-client-request-id' ] return self . _client . send ( request , header_parameters , stream = False , ** operation_config ) def get_long_running_output ( response ) : if response . status_code not in [ 200 , 201 , 202 ] : raise models . ErrorResponseException ( self . _deserialize , response ) deserialized = self . _deserialize ( 'EHNamespace' , response ) if raw : client_raw_response = ClientRawResponse ( deserialized , response ) return client_raw_response return deserialized long_running_operation_timeout = operation_config . get ( 'long_running_operation_timeout' , self . config . long_running_operation_timeout ) return AzureOperationPoller ( long_running_send , get_long_running_output , get_long_running_status , long_running_operation_timeout )
Creates or updates a namespace.
Creates or updates a namespace .
"""Creates or updates a namespace. Once created, this namespace's resource
        manifest is immutable. This operation is idempotent.

        :param resource_group_name: Name of the resource group within the
         azure subscription.
        :type resource_group_name: str
        :param namespace_name: The Namespace name
        :type namespace_name: str
        :param parameters: Parameters for creating a namespace resource.
        :type parameters: ~azure.mgmt.eventhub.models.EHNamespace
        :param dict custom_headers: headers that will be added to the request
        :param bool raw: returns the direct response alongside the
         deserialized response
        :return: An instance of AzureOperationPoller that returns EHNamespace
         or ClientRawResponse if raw=true
        :rtype:
         ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.eventhub.models.EHNamespace]
         or ~msrest.pipeline.ClientRawResponse
        :raises:
         :class:`ErrorResponseException<azure.mgmt.eventhub.models.ErrorResponseException>`
        """ # Construct and send request
An instance of AzureOperationPoller that returns EHNamespace
or ClientRawResponse if raw=true
An instance of AzureOperationPoller that returns EHNamespace or ClientRawResponse if raw = true
~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.eventhub.models.EHNamespace]
or ~msrest.pipeline.ClientRawResponse
None
self
resource_group_name
Name of the resource group within the
azure subscription.
Name of the resource group within the azure subscription .
namespace_name
The Namespace name
The Namespace name
parameters
Parameters for creating a namespace resource.
Parameters for creating a namespace resource .
custom_headers
headers that will be added to the request
headers that will be added to the request
raw
returns the direct response alongside the
deserialized response
returns the direct response alongside the deserialized response