Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/cosmosdb-preview/HISTORY.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
.. :changelog:

Release History
===============
1.2.0
* Add support for Table RBAC role definition and assignment CRUD actions.

+++++++
1.1.0b1
* Add support for Mongo (vCore) destination in container copy jobs.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,15 @@ class CosmosDBManagementClientConfiguration: # pylint: disable=too-many-instanc

:param credential: Credential needed for the client to connect to Azure. Required.
:type credential: ~azure.core.credentials.TokenCredential
:param subscription_id: The ID of the target subscription. Required.
:param subscription_id: The ID of the target subscription. The value must be an UUID. Required.
:type subscription_id: str
:keyword api_version: Api Version. Default value is "2024-09-01-preview". Note that overriding
:keyword api_version: Api Version. Default value is "2024-12-01-preview". Note that overriding
this default value may result in unsupported behavior.
:paramtype api_version: str
"""

def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None:
api_version: str = kwargs.pop("api_version", "2024-09-01-preview")
api_version: str = kwargs.pop("api_version", "2024-12-01-preview")

if credential is None:
raise ValueError("Parameter 'credential' must not be None.")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,10 @@


class CosmosDBManagementClient: # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes
"""Azure Cosmos DB Database Service Resource Provider REST API.
"""Azure Cosmos DB Chaos Fault REST API.

:ivar chaos_fault: ChaosFaultOperations operations
:vartype chaos_fault: azure.mgmt.cosmosdb.operations.ChaosFaultOperations
:ivar database_accounts: DatabaseAccountsOperations operations
:vartype database_accounts: azure.mgmt.cosmosdb.operations.DatabaseAccountsOperations
:ivar operations: Operations operations
Expand Down Expand Up @@ -182,15 +184,13 @@ class CosmosDBManagementClient: # pylint: disable=client-accepts-api-version-ke
:ivar throughput_pool_account: ThroughputPoolAccountOperations operations
:vartype throughput_pool_account:
azure.mgmt.cosmosdb.operations.ThroughputPoolAccountOperations
:ivar chaos_fault: ChaosFaultOperations operations
:vartype chaos_fault: azure.mgmt.cosmosdb.operations.ChaosFaultOperations
:param credential: Credential needed for the client to connect to Azure. Required.
:type credential: ~azure.core.credentials.TokenCredential
:param subscription_id: The ID of the target subscription. Required.
:param subscription_id: The ID of the target subscription. The value must be an UUID. Required.
:type subscription_id: str
:param base_url: Service URL. Default value is "https://management.azure.com".
:type base_url: str
:keyword api_version: Api Version. Default value is "2024-09-01-preview". Note that overriding
:keyword api_version: Api Version. Default value is "2024-12-01-preview". Note that overriding
this default value may result in unsupported behavior.
:paramtype api_version: str
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
Expand Down Expand Up @@ -231,6 +231,7 @@ def __init__(
self._serialize = Serializer(client_models)
self._deserialize = Deserializer(client_models)
self._serialize.client_side_validation = False
self.chaos_fault = ChaosFaultOperations(self._client, self._config, self._serialize, self._deserialize)
self.database_accounts = DatabaseAccountsOperations(
self._client, self._config, self._serialize, self._deserialize
)
Expand Down Expand Up @@ -343,7 +344,6 @@ def __init__(
self.throughput_pool_account = ThroughputPoolAccountOperations(
self._client, self._config, self._serialize, self._deserialize
)
self.chaos_fault = ChaosFaultOperations(self._client, self._config, self._serialize, self._deserialize)

def _send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs: Any) -> HttpResponse:
"""Runs the network request through the client's chained policies.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,15 @@ class CosmosDBManagementClientConfiguration: # pylint: disable=too-many-instanc

:param credential: Credential needed for the client to connect to Azure. Required.
:type credential: ~azure.core.credentials_async.AsyncTokenCredential
:param subscription_id: The ID of the target subscription. Required.
:param subscription_id: The ID of the target subscription. The value must be an UUID. Required.
:type subscription_id: str
:keyword api_version: Api Version. Default value is "2024-09-01-preview". Note that overriding
:keyword api_version: Api Version. Default value is "2024-12-01-preview". Note that overriding
this default value may result in unsupported behavior.
:paramtype api_version: str
"""

def __init__(self, credential: "AsyncTokenCredential", subscription_id: str, **kwargs: Any) -> None:
api_version: str = kwargs.pop("api_version", "2024-09-01-preview")
api_version: str = kwargs.pop("api_version", "2024-12-01-preview")

if credential is None:
raise ValueError("Parameter 'credential' must not be None.")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,10 @@


class CosmosDBManagementClient: # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes
"""Azure Cosmos DB Database Service Resource Provider REST API.
"""Azure Cosmos DB Chaos Fault REST API.

:ivar chaos_fault: ChaosFaultOperations operations
:vartype chaos_fault: azure.mgmt.cosmosdb.aio.operations.ChaosFaultOperations
:ivar database_accounts: DatabaseAccountsOperations operations
:vartype database_accounts: azure.mgmt.cosmosdb.aio.operations.DatabaseAccountsOperations
:ivar operations: Operations operations
Expand Down Expand Up @@ -185,15 +187,13 @@ class CosmosDBManagementClient: # pylint: disable=client-accepts-api-version-ke
:ivar throughput_pool_account: ThroughputPoolAccountOperations operations
:vartype throughput_pool_account:
azure.mgmt.cosmosdb.aio.operations.ThroughputPoolAccountOperations
:ivar chaos_fault: ChaosFaultOperations operations
:vartype chaos_fault: azure.mgmt.cosmosdb.aio.operations.ChaosFaultOperations
:param credential: Credential needed for the client to connect to Azure. Required.
:type credential: ~azure.core.credentials_async.AsyncTokenCredential
:param subscription_id: The ID of the target subscription. Required.
:param subscription_id: The ID of the target subscription. The value must be an UUID. Required.
:type subscription_id: str
:param base_url: Service URL. Default value is "https://management.azure.com".
:type base_url: str
:keyword api_version: Api Version. Default value is "2024-09-01-preview". Note that overriding
:keyword api_version: Api Version. Default value is "2024-12-01-preview". Note that overriding
this default value may result in unsupported behavior.
:paramtype api_version: str
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
Expand Down Expand Up @@ -234,6 +234,7 @@ def __init__(
self._serialize = Serializer(client_models)
self._deserialize = Deserializer(client_models)
self._serialize.client_side_validation = False
self.chaos_fault = ChaosFaultOperations(self._client, self._config, self._serialize, self._deserialize)
self.database_accounts = DatabaseAccountsOperations(
self._client, self._config, self._serialize, self._deserialize
)
Expand Down Expand Up @@ -346,7 +347,6 @@ def __init__(
self.throughput_pool_account = ThroughputPoolAccountOperations(
self._client, self._config, self._serialize, self._deserialize
)
self.chaos_fault = ChaosFaultOperations(self._client, self._config, self._serialize, self._deserialize)

def _send_request(
self, request: HttpRequest, *, stream: bool = False, **kwargs: Any
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

from ._chaos_fault_operations import ChaosFaultOperations
from ._database_accounts_operations import DatabaseAccountsOperations
from ._operations import Operations
from ._database_operations import DatabaseOperations
Expand Down Expand Up @@ -50,13 +51,13 @@
from ._throughput_pool_operations import ThroughputPoolOperations
from ._throughput_pool_accounts_operations import ThroughputPoolAccountsOperations
from ._throughput_pool_account_operations import ThroughputPoolAccountOperations
from ._chaos_fault_operations import ChaosFaultOperations

from ._patch import __all__ as _patch_all
from ._patch import * # pylint: disable=unused-wildcard-import
from ._patch import patch_sdk as _patch_sdk

__all__ = [
"ChaosFaultOperations",
"DatabaseAccountsOperations",
"Operations",
"DatabaseOperations",
Expand Down Expand Up @@ -101,7 +102,6 @@
"ThroughputPoolOperations",
"ThroughputPoolAccountsOperations",
"ThroughputPoolAccountOperations",
"ChaosFaultOperations",
]
__all__.extend([p for p in _patch_all if p not in __all__])
_patch_sdk()
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ async def get_next(next_link=None):

if response.status_code not in [200]:
map_error(status_code=response.status_code, response=response, error_map=error_map)
error = self._deserialize.failsafe_deserialize(_models.ErrorResponseAutoGenerated, pipeline_response)
error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response)
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)

return pipeline_response
Expand Down Expand Up @@ -204,7 +204,7 @@ async def _enable_disable_initial(
except (StreamConsumedError, StreamClosedError):
pass
map_error(status_code=response.status_code, response=response, error_map=error_map)
error = self._deserialize.failsafe_deserialize(_models.ErrorResponseAutoGenerated, pipeline_response)
error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response)
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)

deserialized = response.stream_download(self._client._pipeline, decompress=_decompress)
Expand Down Expand Up @@ -403,7 +403,7 @@ async def get(

if response.status_code not in [200]:
map_error(status_code=response.status_code, response=response, error_map=error_map)
error = self._deserialize.failsafe_deserialize(_models.ErrorResponseAutoGenerated, pipeline_response)
error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response)
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)

deserialized = self._deserialize("ChaosFaultResource", pipeline_response.http_response)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1173,7 +1173,7 @@ async def _offline_region_initial(
except (StreamConsumedError, StreamClosedError):
pass
map_error(status_code=response.status_code, response=response, error_map=error_map)
error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response)
error = self._deserialize.failsafe_deserialize(_models.ErrorResponseAutoGenerated, pipeline_response)
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)

response_headers = {}
Expand Down Expand Up @@ -1369,7 +1369,7 @@ async def _online_region_initial(
except (StreamConsumedError, StreamClosedError):
pass
map_error(status_code=response.status_code, response=response, error_map=error_map)
error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response)
error = self._deserialize.failsafe_deserialize(_models.ErrorResponseAutoGenerated, pipeline_response)
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)

response_headers = {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ async def get_next(next_link=None):

if response.status_code not in [200]:
map_error(status_code=response.status_code, response=response, error_map=error_map)
error = self._deserialize.failsafe_deserialize(_models.ErrorResponseAutoGenerated, pipeline_response)
error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response)
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)

return pipeline_response
Expand Down Expand Up @@ -206,7 +206,7 @@ async def get(

if response.status_code not in [200]:
map_error(status_code=response.status_code, response=response, error_map=error_map)
error = self._deserialize.failsafe_deserialize(_models.ErrorResponseAutoGenerated, pipeline_response)
error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response)
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)

deserialized = self._deserialize("NetworkSecurityPerimeterConfiguration", pipeline_response.http_response)
Expand Down Expand Up @@ -262,7 +262,7 @@ async def _reconcile_initial(
except (StreamConsumedError, StreamClosedError):
pass
map_error(status_code=response.status_code, response=response, error_map=error_map)
error = self._deserialize.failsafe_deserialize(_models.ErrorResponseAutoGenerated, pipeline_response)
error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response)
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)

response_headers = {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ async def get_next(next_link=None):

if response.status_code not in [200]:
map_error(status_code=response.status_code, response=response, error_map=error_map)
error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response)
error = self._deserialize.failsafe_deserialize(_models.ErrorResponseAutoGenerated, pipeline_response)
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)

return pipeline_response
Expand Down Expand Up @@ -209,7 +209,7 @@ async def get(

if response.status_code not in [200]:
map_error(status_code=response.status_code, response=response, error_map=error_map)
error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response)
error = self._deserialize.failsafe_deserialize(_models.ErrorResponseAutoGenerated, pipeline_response)
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)

deserialized = self._deserialize("NotebookWorkspace", pipeline_response.http_response)
Expand Down Expand Up @@ -278,7 +278,7 @@ async def _create_or_update_initial(
except (StreamConsumedError, StreamClosedError):
pass
map_error(status_code=response.status_code, response=response, error_map=error_map)
error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response)
error = self._deserialize.failsafe_deserialize(_models.ErrorResponseAutoGenerated, pipeline_response)
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)

deserialized = response.stream_download(self._client._pipeline, decompress=_decompress)
Expand Down Expand Up @@ -478,7 +478,7 @@ async def _delete_initial(
except (StreamConsumedError, StreamClosedError):
pass
map_error(status_code=response.status_code, response=response, error_map=error_map)
error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response)
error = self._deserialize.failsafe_deserialize(_models.ErrorResponseAutoGenerated, pipeline_response)
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)

deserialized = response.stream_download(self._client._pipeline, decompress=_decompress)
Expand Down Expand Up @@ -607,7 +607,7 @@ async def list_connection_info(

if response.status_code not in [200]:
map_error(status_code=response.status_code, response=response, error_map=error_map)
error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response)
error = self._deserialize.failsafe_deserialize(_models.ErrorResponseAutoGenerated, pipeline_response)
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)

deserialized = self._deserialize("NotebookWorkspaceConnectionInfoResult", pipeline_response.http_response)
Expand Down Expand Up @@ -663,7 +663,7 @@ async def _regenerate_auth_token_initial(
except (StreamConsumedError, StreamClosedError):
pass
map_error(status_code=response.status_code, response=response, error_map=error_map)
error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response)
error = self._deserialize.failsafe_deserialize(_models.ErrorResponseAutoGenerated, pipeline_response)
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)

deserialized = response.stream_download(self._client._pipeline, decompress=_decompress)
Expand Down Expand Up @@ -782,7 +782,7 @@ async def _start_initial(
except (StreamConsumedError, StreamClosedError):
pass
map_error(status_code=response.status_code, response=response, error_map=error_map)
error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response)
error = self._deserialize.failsafe_deserialize(_models.ErrorResponseAutoGenerated, pipeline_response)
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)

deserialized = response.stream_download(self._client._pipeline, decompress=_decompress)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ async def _create_or_update_initial(
except (StreamConsumedError, StreamClosedError):
pass
map_error(status_code=response.status_code, response=response, error_map=error_map)
error = self._deserialize.failsafe_deserialize(_models.ErrorResponseAutoGenerated, pipeline_response)
error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response)
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)

deserialized = response.stream_download(self._client._pipeline, decompress=_decompress)
Expand Down Expand Up @@ -460,7 +460,7 @@ async def _delete_initial(
except (StreamConsumedError, StreamClosedError):
pass
map_error(status_code=response.status_code, response=response, error_map=error_map)
error = self._deserialize.failsafe_deserialize(_models.ErrorResponseAutoGenerated, pipeline_response)
error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response)
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)

deserialized = response.stream_download(self._client._pipeline, decompress=_decompress)
Expand Down
Loading