How to use the azure-mgmt-security.azure.mgmt.security.models.WorkspaceSetting function in azure-mgmt-security

To help you get started, we’ve selected a few azure-mgmt-security examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Azure / azure-sdk-for-python / azure-mgmt-security / azure / mgmt / security / operations / workspace_settings_operations.py View on Github external
:type workspace_id: str
        :param scope: All the VMs in this scope will send their security data
         to the mentioned workspace unless overridden by a setting with more
         specific scope
        :type scope: str
        :param dict custom_headers: headers that will be added to the request
        :param bool raw: returns the direct response alongside the
         deserialized response
        :param operation_config: :ref:`Operation configuration
         overrides`.
        :return: WorkspaceSetting or ClientRawResponse if raw=true
        :rtype: ~azure.mgmt.security.models.WorkspaceSetting or
         ~msrest.pipeline.ClientRawResponse
        :raises: :class:`CloudError`
        """
        workspace_setting = models.WorkspaceSetting(workspace_id=workspace_id, scope=scope)

        # Construct URL
        url = self.create.metadata['url']
        path_format_arguments = {
            'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'),
            'workspaceSettingName': self._serialize.url("workspace_setting_name", workspace_setting_name, 'str')
        }
        url = self._client.format_url(url, **path_format_arguments)

        # Construct parameters
        query_parameters = {}
        query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str')

        # Construct headers
        header_parameters = {}
        header_parameters['Accept'] = 'application/json'
github Azure / azure-sdk-for-python / azure-mgmt-security / azure / mgmt / security / operations / workspace_settings_operations.py View on Github external
:type workspace_id: str
        :param scope: All the VMs in this scope will send their security data
         to the mentioned workspace unless overridden by a setting with more
         specific scope
        :type scope: str
        :param dict custom_headers: headers that will be added to the request
        :param bool raw: returns the direct response alongside the
         deserialized response
        :param operation_config: :ref:`Operation configuration
         overrides`.
        :return: WorkspaceSetting or ClientRawResponse if raw=true
        :rtype: ~azure.mgmt.security.models.WorkspaceSetting or
         ~msrest.pipeline.ClientRawResponse
        :raises: :class:`CloudError`
        """
        workspace_setting = models.WorkspaceSetting(workspace_id=workspace_id, scope=scope)

        # Construct URL
        url = self.update.metadata['url']
        path_format_arguments = {
            'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', pattern=r'^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$'),
            'workspaceSettingName': self._serialize.url("workspace_setting_name", workspace_setting_name, 'str')
        }
        url = self._client.format_url(url, **path_format_arguments)

        # Construct parameters
        query_parameters = {}
        query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str')

        # Construct headers
        header_parameters = {}
        header_parameters['Accept'] = 'application/json'

azure-mgmt-security

Microsoft Azure Security Center Management Client Library for Python

MIT
Latest version published 6 months ago

Package Health Score

94 / 100
Full package analysis

Similar packages