How to use the azure-mgmt-cosmosdb.azure.mgmt.cosmosdb.models.FailoverPolicies function in azure-mgmt-cosmosdb

To help you get started, we’ve selected a few azure-mgmt-cosmosdb 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-cosmosdb / azure / mgmt / cosmosdb / operations / database_accounts_operations.py View on Github external
def _failover_priority_change_initial(
            self, resource_group_name, account_name, failover_policies, custom_headers=None, raw=False, **operation_config):
        failover_parameters = models.FailoverPolicies(failover_policies=failover_policies)

        # Construct URL
        url = self.failover_priority_change.metadata['url']
        path_format_arguments = {
            'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'),
            'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
            'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3)
        }
        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 = {}

azure-mgmt-cosmosdb

Microsoft Azure Cosmos DB Management Client Library for Python

MIT
Latest version published 7 days ago

Package Health Score

96 / 100
Full package analysis

Similar packages