How to use the azure-mgmt-sql.azure.mgmt.sql.models.BackupShortTermRetentionPolicy function in azure-mgmt-sql

To help you get started, we’ve selected a few azure-mgmt-sql 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-sql / azure / mgmt / sql / operations / backup_short_term_retention_policies_operations.py View on Github external
def _create_or_update_initial(
            self, resource_group_name, server_name, database_name, retention_days=None, custom_headers=None, raw=False, **operation_config):
        parameters = models.BackupShortTermRetentionPolicy(retention_days=retention_days)

        # Construct URL
        url = self.create_or_update.metadata['url']
        path_format_arguments = {
            'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
            'serverName': self._serialize.url("server_name", server_name, 'str'),
            'databaseName': self._serialize.url("database_name", database_name, 'str'),
            'policyName': self._serialize.url("self.policy_name", self.policy_name, 'str'),
            'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, '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')
github Azure / azure-sdk-for-python / azure-mgmt-sql / azure / mgmt / sql / operations / backup_short_term_retention_policies_operations.py View on Github external
def _update_initial(
            self, resource_group_name, server_name, database_name, retention_days=None, custom_headers=None, raw=False, **operation_config):
        parameters = models.BackupShortTermRetentionPolicy(retention_days=retention_days)

        # Construct URL
        url = self.update.metadata['url']
        path_format_arguments = {
            'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
            'serverName': self._serialize.url("server_name", server_name, 'str'),
            'databaseName': self._serialize.url("database_name", database_name, 'str'),
            'policyName': self._serialize.url("self.policy_name", self.policy_name, 'str'),
            'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, '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')