From 583146715718fbf2bb1f7f9315ac48ba3b9ce0c4 Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Fri, 27 Sep 2024 00:12:48 -0700 Subject: [PATCH] [AutoRelease] t2-mongocluster-2024-09-25-24276(can only be merged by SDK owner) (#37563) * code and test * update-testcase * Update CHANGELOG.md * Update CHANGELOG.md --------- Co-authored-by: azure-sdk Co-authored-by: ChenxiJiang333 Co-authored-by: ChenxiJiang333 <119990644+ChenxiJiang333@users.noreply.github.com> Co-authored-by: Yuchao Yan --- .../azure-mgmt-mongocluster/CHANGELOG.md | 37 ++ .../azure-mgmt-mongocluster/_meta.json | 2 +- .../azure/mgmt/mongocluster/_client.py | 5 +- .../azure/mgmt/mongocluster/_configuration.py | 7 +- .../azure/mgmt/mongocluster/_version.py | 2 +- .../azure/mgmt/mongocluster/aio/_client.py | 5 +- .../mgmt/mongocluster/aio/_configuration.py | 7 +- .../mgmt/mongocluster/models/__init__.py | 18 +- .../azure/mgmt/mongocluster/models/_enums.py | 21 +- .../azure/mgmt/mongocluster/models/_models.py | 319 +++++++++++++----- .../mongocluster/operations/_operations.py | 40 +-- .../mongo_clusters_create.py | 12 +- .../mongo_clusters_create_geo_replica.py | 2 +- .../mongo_clusters_create_pitr.py | 2 +- .../mongo_clusters_delete.py | 2 +- .../mongo_clusters_firewall_rule_create.py | 2 +- .../mongo_clusters_firewall_rule_delete.py | 2 +- .../mongo_clusters_firewall_rule_get.py | 2 +- .../mongo_clusters_firewall_rule_list.py | 2 +- .../mongo_clusters_force_promote_replica.py | 2 +- .../generated_samples/mongo_clusters_get.py | 2 +- .../generated_samples/mongo_clusters_list.py | 2 +- .../mongo_clusters_list_by_resource_group.py | 2 +- .../mongo_clusters_list_connection_strings.py | 2 +- .../mongo_clusters_name_availability.py | 2 +- ...usters_name_availability_already_exists.py | 2 +- .../mongo_clusters_patch_disk_size.py | 4 +- ...o_clusters_patch_private_network_access.py | 2 +- ...ters_private_endpoint_connection_delete.py | 2 +- ...lusters_private_endpoint_connection_get.py | 2 +- ...usters_private_endpoint_connection_list.py | 2 +- ...lusters_private_endpoint_connection_put.py | 2 +- ...ngo_clusters_private_link_resource_list.py | 2 +- .../mongo_clusters_replica_list.py | 2 +- .../mongo_clusters_reset_password.py | 4 +- .../mongo_clusters_update.py | 13 +- .../generated_samples/operations_list.py | 2 +- ..._cluster_mgmt_mongo_clusters_operations.py | 23 +- ...er_mgmt_mongo_clusters_operations_async.py | 23 +- .../sdk_packaging.toml | 2 +- .../azure-mgmt-mongocluster/setup.py | 2 +- .../azure-mgmt-mongocluster/tests/conftest.py | 56 ++- .../test_cli_mgmt_mongocluster_lro_test.py | 28 +- ...ter_mgmt_mongo_clusters_operations_test.py | 1 - ...ongo_cluster_mgmt_operations_async_test.py | 1 - ...test_mongo_cluster_mgmt_operations_test.py | 1 - .../azure-mgmt-mongocluster/tsp-location.yaml | 2 +- 47 files changed, 427 insertions(+), 252 deletions(-) diff --git a/sdk/mongocluster/azure-mgmt-mongocluster/CHANGELOG.md b/sdk/mongocluster/azure-mgmt-mongocluster/CHANGELOG.md index a29eb4b85fe6..a8b2eb1dbc81 100644 --- a/sdk/mongocluster/azure-mgmt-mongocluster/CHANGELOG.md +++ b/sdk/mongocluster/azure-mgmt-mongocluster/CHANGELOG.md @@ -1,5 +1,42 @@ # Release History +## 1.0.0 (2024-09-26) + +### Features Added + + - Model `ConnectionString` added property `name` + - Model `MongoClusterProperties` added property `administrator` + - Model `MongoClusterProperties` added property `high_availability` + - Model `MongoClusterProperties` added property `storage` + - Model `MongoClusterProperties` added property `sharding` + - Model `MongoClusterProperties` added property `compute` + - Model `MongoClusterProperties` added property `backup` + - Model `MongoClusterUpdateProperties` added property `administrator` + - Model `MongoClusterUpdateProperties` added property `high_availability` + - Model `MongoClusterUpdateProperties` added property `storage` + - Model `MongoClusterUpdateProperties` added property `sharding` + - Model `MongoClusterUpdateProperties` added property `compute` + - Model `MongoClusterUpdateProperties` added property `backup` + - Added model `AdministratorProperties` + - Added model `BackupProperties` + - Added model `ComputeProperties` + - Added enum `HighAvailabilityMode` + - Added model `HighAvailabilityProperties` + - Added model `ShardingProperties` + - Added model `StorageProperties` + +### Breaking Changes + + - Model `MongoClusterProperties` deleted or renamed its instance variable `administrator_login` + - Model `MongoClusterProperties` deleted or renamed its instance variable `administrator_login_password` + - Model `MongoClusterProperties` deleted or renamed its instance variable `earliest_restore_time` + - Model `MongoClusterProperties` deleted or renamed its instance variable `node_group_specs` + - Model `MongoClusterUpdateProperties` deleted or renamed its instance variable `administrator_login` + - Model `MongoClusterUpdateProperties` deleted or renamed its instance variable `administrator_login_password` + - Model `MongoClusterUpdateProperties` deleted or renamed its instance variable `node_group_specs` + - Deleted or renamed model `NodeGroupSpec` + - Deleted or renamed model `NodeKind` + ## 1.0.0b2 (2024-09-23) ### Features Added diff --git a/sdk/mongocluster/azure-mgmt-mongocluster/_meta.json b/sdk/mongocluster/azure-mgmt-mongocluster/_meta.json index 0fd55258a046..c03f8a84580e 100644 --- a/sdk/mongocluster/azure-mgmt-mongocluster/_meta.json +++ b/sdk/mongocluster/azure-mgmt-mongocluster/_meta.json @@ -1,5 +1,5 @@ { - "commit": "465d34792335e02d9bf8de153734420d769adac1", + "commit": "f93850874010501f216ceadf19459402efd16d9e", "repository_url": "https://github.com/Azure/azure-rest-api-specs", "typespec_src": "specification/mongocluster/DocumentDB.MongoCluster.Management", "@azure-tools/typespec-python": "0.33.0" diff --git a/sdk/mongocluster/azure-mgmt-mongocluster/azure/mgmt/mongocluster/_client.py b/sdk/mongocluster/azure-mgmt-mongocluster/azure/mgmt/mongocluster/_client.py index aeed9457d267..93fcfbef2c23 100644 --- a/sdk/mongocluster/azure-mgmt-mongocluster/azure/mgmt/mongocluster/_client.py +++ b/sdk/mongocluster/azure-mgmt-mongocluster/azure/mgmt/mongocluster/_client.py @@ -54,9 +54,8 @@ class MongoClusterMgmtClient: # pylint: disable=client-accepts-api-version-keyw :type subscription_id: str :param base_url: Service host. Default value is "https://management.azure.com". :type base_url: str - :keyword api_version: The API version to use for this operation. Default value is - "2024-06-01-preview". Note that overriding this default value may result in unsupported - behavior. + :keyword api_version: The API version to use for this operation. Default value is "2024-07-01". + 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 Retry-After header is present. diff --git a/sdk/mongocluster/azure-mgmt-mongocluster/azure/mgmt/mongocluster/_configuration.py b/sdk/mongocluster/azure-mgmt-mongocluster/azure/mgmt/mongocluster/_configuration.py index fcb324b0901b..870c54669cad 100644 --- a/sdk/mongocluster/azure-mgmt-mongocluster/azure/mgmt/mongocluster/_configuration.py +++ b/sdk/mongocluster/azure-mgmt-mongocluster/azure/mgmt/mongocluster/_configuration.py @@ -30,9 +30,8 @@ class MongoClusterMgmtClientConfiguration: # pylint: disable=too-many-instance- :type subscription_id: str :param base_url: Service host. Default value is "https://management.azure.com". :type base_url: str - :keyword api_version: The API version to use for this operation. Default value is - "2024-06-01-preview". Note that overriding this default value may result in unsupported - behavior. + :keyword api_version: The API version to use for this operation. Default value is "2024-07-01". + Note that overriding this default value may result in unsupported behavior. :paramtype api_version: str """ @@ -43,7 +42,7 @@ def __init__( base_url: str = "https://management.azure.com", **kwargs: Any ) -> None: - api_version: str = kwargs.pop("api_version", "2024-06-01-preview") + api_version: str = kwargs.pop("api_version", "2024-07-01") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/mongocluster/azure-mgmt-mongocluster/azure/mgmt/mongocluster/_version.py b/sdk/mongocluster/azure-mgmt-mongocluster/azure/mgmt/mongocluster/_version.py index bbcd28b4aa67..0ec13ea52bbf 100644 --- a/sdk/mongocluster/azure-mgmt-mongocluster/azure/mgmt/mongocluster/_version.py +++ b/sdk/mongocluster/azure-mgmt-mongocluster/azure/mgmt/mongocluster/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "1.0.0b2" +VERSION = "1.0.0" diff --git a/sdk/mongocluster/azure-mgmt-mongocluster/azure/mgmt/mongocluster/aio/_client.py b/sdk/mongocluster/azure-mgmt-mongocluster/azure/mgmt/mongocluster/aio/_client.py index 2a2f5cd5647f..837664327c15 100644 --- a/sdk/mongocluster/azure-mgmt-mongocluster/azure/mgmt/mongocluster/aio/_client.py +++ b/sdk/mongocluster/azure-mgmt-mongocluster/azure/mgmt/mongocluster/aio/_client.py @@ -54,9 +54,8 @@ class MongoClusterMgmtClient: # pylint: disable=client-accepts-api-version-keyw :type subscription_id: str :param base_url: Service host. Default value is "https://management.azure.com". :type base_url: str - :keyword api_version: The API version to use for this operation. Default value is - "2024-06-01-preview". Note that overriding this default value may result in unsupported - behavior. + :keyword api_version: The API version to use for this operation. Default value is "2024-07-01". + 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 Retry-After header is present. diff --git a/sdk/mongocluster/azure-mgmt-mongocluster/azure/mgmt/mongocluster/aio/_configuration.py b/sdk/mongocluster/azure-mgmt-mongocluster/azure/mgmt/mongocluster/aio/_configuration.py index f25d6d53957a..fefa880a1456 100644 --- a/sdk/mongocluster/azure-mgmt-mongocluster/azure/mgmt/mongocluster/aio/_configuration.py +++ b/sdk/mongocluster/azure-mgmt-mongocluster/azure/mgmt/mongocluster/aio/_configuration.py @@ -30,9 +30,8 @@ class MongoClusterMgmtClientConfiguration: # pylint: disable=too-many-instance- :type subscription_id: str :param base_url: Service host. Default value is "https://management.azure.com". :type base_url: str - :keyword api_version: The API version to use for this operation. Default value is - "2024-06-01-preview". Note that overriding this default value may result in unsupported - behavior. + :keyword api_version: The API version to use for this operation. Default value is "2024-07-01". + Note that overriding this default value may result in unsupported behavior. :paramtype api_version: str """ @@ -43,7 +42,7 @@ def __init__( base_url: str = "https://management.azure.com", **kwargs: Any ) -> None: - api_version: str = kwargs.pop("api_version", "2024-06-01-preview") + api_version: str = kwargs.pop("api_version", "2024-07-01") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/mongocluster/azure-mgmt-mongocluster/azure/mgmt/mongocluster/models/__init__.py b/sdk/mongocluster/azure-mgmt-mongocluster/azure/mgmt/mongocluster/models/__init__.py index bfe59d753613..a352c3476837 100644 --- a/sdk/mongocluster/azure-mgmt-mongocluster/azure/mgmt/mongocluster/models/__init__.py +++ b/sdk/mongocluster/azure-mgmt-mongocluster/azure/mgmt/mongocluster/models/__init__.py @@ -6,14 +6,18 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from ._models import AdministratorProperties +from ._models import BackupProperties from ._models import CheckNameAvailabilityRequest from ._models import CheckNameAvailabilityResponse +from ._models import ComputeProperties from ._models import ConnectionString from ._models import ErrorAdditionalInfo from ._models import ErrorDetail from ._models import ErrorResponse from ._models import FirewallRule from ._models import FirewallRuleProperties +from ._models import HighAvailabilityProperties from ._models import ListConnectionStringsResult from ._models import MongoCluster from ._models import MongoClusterProperties @@ -21,7 +25,6 @@ from ._models import MongoClusterRestoreParameters from ._models import MongoClusterUpdate from ._models import MongoClusterUpdateProperties -from ._models import NodeGroupSpec from ._models import Operation from ._models import OperationDisplay from ._models import PrivateEndpoint @@ -36,6 +39,8 @@ from ._models import Replica from ._models import ReplicationProperties from ._models import Resource +from ._models import ShardingProperties +from ._models import StorageProperties from ._models import SystemData from ._models import TrackedResource @@ -43,8 +48,8 @@ from ._enums import CheckNameAvailabilityReason from ._enums import CreateMode from ._enums import CreatedByType +from ._enums import HighAvailabilityMode from ._enums import MongoClusterStatus -from ._enums import NodeKind from ._enums import Origin from ._enums import PreviewFeature from ._enums import PrivateEndpointConnectionProvisioningState @@ -60,14 +65,18 @@ from ._patch import patch_sdk as _patch_sdk __all__ = [ + "AdministratorProperties", + "BackupProperties", "CheckNameAvailabilityRequest", "CheckNameAvailabilityResponse", + "ComputeProperties", "ConnectionString", "ErrorAdditionalInfo", "ErrorDetail", "ErrorResponse", "FirewallRule", "FirewallRuleProperties", + "HighAvailabilityProperties", "ListConnectionStringsResult", "MongoCluster", "MongoClusterProperties", @@ -75,7 +84,6 @@ "MongoClusterRestoreParameters", "MongoClusterUpdate", "MongoClusterUpdateProperties", - "NodeGroupSpec", "Operation", "OperationDisplay", "PrivateEndpoint", @@ -90,14 +98,16 @@ "Replica", "ReplicationProperties", "Resource", + "ShardingProperties", + "StorageProperties", "SystemData", "TrackedResource", "ActionType", "CheckNameAvailabilityReason", "CreateMode", "CreatedByType", + "HighAvailabilityMode", "MongoClusterStatus", - "NodeKind", "Origin", "PreviewFeature", "PrivateEndpointConnectionProvisioningState", diff --git a/sdk/mongocluster/azure-mgmt-mongocluster/azure/mgmt/mongocluster/models/_enums.py b/sdk/mongocluster/azure-mgmt-mongocluster/azure/mgmt/mongocluster/models/_enums.py index a621138cad6a..850548c02ab8 100644 --- a/sdk/mongocluster/azure-mgmt-mongocluster/azure/mgmt/mongocluster/models/_enums.py +++ b/sdk/mongocluster/azure-mgmt-mongocluster/azure/mgmt/mongocluster/models/_enums.py @@ -54,6 +54,20 @@ class CreateMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Create a replica cluster in the same geographic region as the source cluster.""" +class HighAvailabilityMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The high availability modes for a cluster.""" + + DISABLED = "Disabled" + """High availability mode is disabled. This mode is can see availability impact during faults or + maintenance and is not recommended for production.""" + SAME_ZONE = "SameZone" + """High availability mode is enabled, where each server in a shard is placed in the same + availability zone.""" + ZONE_REDUNDANT_PREFERRED = "ZoneRedundantPreferred" + """High availability mode is enabled and preferences ZoneRedundant if availability zones capacity + is available in the region, otherwise falls-back to provisioning with SameZone.""" + + class MongoClusterStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The status of the Mongo cluster resource.""" @@ -73,13 +87,6 @@ class MongoClusterStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The mongo cluster resource is being dropped.""" -class NodeKind(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """The kind of the node on the cluster.""" - - SHARD = "Shard" - """The node is a shard kind.""" - - class Origin(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is "user,system". diff --git a/sdk/mongocluster/azure-mgmt-mongocluster/azure/mgmt/mongocluster/models/_models.py b/sdk/mongocluster/azure-mgmt-mongocluster/azure/mgmt/mongocluster/models/_models.py index 02d2275f5bd1..6558dd01704b 100644 --- a/sdk/mongocluster/azure-mgmt-mongocluster/azure/mgmt/mongocluster/models/_models.py +++ b/sdk/mongocluster/azure-mgmt-mongocluster/azure/mgmt/mongocluster/models/_models.py @@ -18,6 +18,53 @@ from .. import models as _models +class AdministratorProperties(_model_base.Model): + """The local administrator login properties. + + :ivar user_name: The administrator user name. + :vartype user_name: str + :ivar password: The administrator password. + :vartype password: str + """ + + user_name: Optional[str] = rest_field(name="userName", visibility=["read", "create", "update"]) + """The administrator user name.""" + password: Optional[str] = rest_field(visibility=["create", "update"]) + """The administrator password.""" + + @overload + def __init__( + self, + *, + user_name: Optional[str] = None, + password: Optional[str] = None, + ): ... + + @overload + def __init__(self, mapping: Mapping[str, Any]): + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + super().__init__(*args, **kwargs) + + +class BackupProperties(_model_base.Model): + """The backup properties of the cluster. This includes the earliest restore time and retention + settings. + + Readonly variables are only populated by the server, and will be ignored when sending a request. + + :ivar earliest_restore_time: Earliest restore timestamp in UTC ISO8601 format. + :vartype earliest_restore_time: str + """ + + earliest_restore_time: Optional[str] = rest_field(name="earliestRestoreTime", visibility=["read"]) + """Earliest restore timestamp in UTC ISO8601 format.""" + + class CheckNameAvailabilityRequest(_model_base.Model): """The check availability request body. @@ -91,6 +138,37 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useles super().__init__(*args, **kwargs) +class ComputeProperties(_model_base.Model): + """The compute properties of the cluster. This includes the virtual-cores/memory and scaling + options applied to servers in the cluster. + + :ivar tier: The compute tier to assign to the cluster, where each tier maps to a virtual-core + and memory size. Example values: 'M30', 'M40'. + :vartype tier: str + """ + + tier: Optional[str] = rest_field() + """The compute tier to assign to the cluster, where each tier maps to a virtual-core and memory + size. Example values: 'M30', 'M40'.""" + + @overload + def __init__( + self, + *, + tier: Optional[str] = None, + ): ... + + @overload + def __init__(self, mapping: Mapping[str, Any]): + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + super().__init__(*args, **kwargs) + + class ConnectionString(_model_base.Model): """Connection string for the mongo cluster. @@ -100,12 +178,16 @@ class ConnectionString(_model_base.Model): :vartype connection_string: str :ivar description: Description of the connection string. :vartype description: str + :ivar name: Name of the connection string. + :vartype name: str """ connection_string: Optional[str] = rest_field(name="connectionString", visibility=["read"]) """Value of the connection string.""" description: Optional[str] = rest_field(visibility=["read"]) """Description of the connection string.""" + name: Optional[str] = rest_field(visibility=["read"]) + """Name of the connection string.""" class ErrorAdditionalInfo(_model_base.Model): @@ -322,6 +404,36 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useles super().__init__(*args, **kwargs) +class HighAvailabilityProperties(_model_base.Model): + """The high availability properties of the cluster. + + :ivar target_mode: The target high availability mode requested for the cluster. Known values + are: "Disabled", "SameZone", and "ZoneRedundantPreferred". + :vartype target_mode: str or ~azure.mgmt.mongocluster.models.HighAvailabilityMode + """ + + target_mode: Optional[Union[str, "_models.HighAvailabilityMode"]] = rest_field(name="targetMode") + """The target high availability mode requested for the cluster. Known values are: \"Disabled\", + \"SameZone\", and \"ZoneRedundantPreferred\".""" + + @overload + def __init__( + self, + *, + target_mode: Optional[Union[str, "_models.HighAvailabilityMode"]] = None, + ): ... + + @overload + def __init__(self, mapping: Mapping[str, Any]): + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + super().__init__(*args, **kwargs) + + class ListConnectionStringsResult(_model_base.Model): """The connection strings for the given mongo cluster. @@ -445,17 +557,13 @@ class MongoClusterProperties(_model_base.Model): # pylint: disable=too-many-ins :vartype restore_parameters: ~azure.mgmt.mongocluster.models.MongoClusterRestoreParameters :ivar replica_parameters: The parameters to create a replica mongo cluster. :vartype replica_parameters: ~azure.mgmt.mongocluster.models.MongoClusterReplicaParameters - :ivar administrator_login: The administrator's login for the mongo cluster. - :vartype administrator_login: str - :ivar administrator_login_password: The password of the administrator login. - :vartype administrator_login_password: str + :ivar administrator: The local administrator properties for the mongo cluster. + :vartype administrator: ~azure.mgmt.mongocluster.models.AdministratorProperties :ivar server_version: The Mongo DB server version. Defaults to the latest available version if not specified. :vartype server_version: str :ivar connection_string: The default mongo connection string for the cluster. :vartype connection_string: str - :ivar earliest_restore_time: Earliest restore timestamp in UTC ISO8601 format. - :vartype earliest_restore_time: str :ivar provisioning_state: The provisioning state of the mongo cluster. Known values are: "Succeeded", "Failed", "Canceled", "InProgress", "Updating", and "Dropping". :vartype provisioning_state: str or ~azure.mgmt.mongocluster.models.ProvisioningState @@ -465,8 +573,16 @@ class MongoClusterProperties(_model_base.Model): # pylint: disable=too-many-ins :ivar public_network_access: Whether or not public endpoint access is allowed for this mongo cluster. Known values are: "Enabled" and "Disabled". :vartype public_network_access: str or ~azure.mgmt.mongocluster.models.PublicNetworkAccess - :ivar node_group_specs: The list of node group specs in the cluster. - :vartype node_group_specs: list[~azure.mgmt.mongocluster.models.NodeGroupSpec] + :ivar high_availability: The high availability properties of the mongo cluster. + :vartype high_availability: ~azure.mgmt.mongocluster.models.HighAvailabilityProperties + :ivar storage: The storage properties of the mongo cluster. + :vartype storage: ~azure.mgmt.mongocluster.models.StorageProperties + :ivar sharding: The sharding properties of the mongo cluster. + :vartype sharding: ~azure.mgmt.mongocluster.models.ShardingProperties + :ivar compute: The compute properties of the mongo cluster. + :vartype compute: ~azure.mgmt.mongocluster.models.ComputeProperties + :ivar backup: The backup properties of the mongo cluster. + :vartype backup: ~azure.mgmt.mongocluster.models.BackupProperties :ivar private_endpoint_connections: List of private endpoint connections. :vartype private_endpoint_connections: list[~azure.mgmt.mongocluster.models.PrivateEndpointConnection] @@ -489,18 +605,12 @@ class MongoClusterProperties(_model_base.Model): # pylint: disable=too-many-ins name="replicaParameters", visibility=["create"] ) """The parameters to create a replica mongo cluster.""" - administrator_login: Optional[str] = rest_field(name="administratorLogin", visibility=["read", "create", "update"]) - """The administrator's login for the mongo cluster.""" - administrator_login_password: Optional[str] = rest_field( - name="administratorLoginPassword", visibility=["create", "update"] - ) - """The password of the administrator login.""" + administrator: Optional["_models.AdministratorProperties"] = rest_field() + """The local administrator properties for the mongo cluster.""" server_version: Optional[str] = rest_field(name="serverVersion") """The Mongo DB server version. Defaults to the latest available version if not specified.""" connection_string: Optional[str] = rest_field(name="connectionString", visibility=["read"]) """The default mongo connection string for the cluster.""" - earliest_restore_time: Optional[str] = rest_field(name="earliestRestoreTime", visibility=["read"]) - """Earliest restore timestamp in UTC ISO8601 format.""" provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = rest_field( name="provisioningState", visibility=["read"] ) @@ -514,8 +624,16 @@ class MongoClusterProperties(_model_base.Model): # pylint: disable=too-many-ins public_network_access: Optional[Union[str, "_models.PublicNetworkAccess"]] = rest_field(name="publicNetworkAccess") """Whether or not public endpoint access is allowed for this mongo cluster. Known values are: \"Enabled\" and \"Disabled\".""" - node_group_specs: Optional[List["_models.NodeGroupSpec"]] = rest_field(name="nodeGroupSpecs") - """The list of node group specs in the cluster.""" + high_availability: Optional["_models.HighAvailabilityProperties"] = rest_field(name="highAvailability") + """The high availability properties of the mongo cluster.""" + storage: Optional["_models.StorageProperties"] = rest_field() + """The storage properties of the mongo cluster.""" + sharding: Optional["_models.ShardingProperties"] = rest_field() + """The sharding properties of the mongo cluster.""" + compute: Optional["_models.ComputeProperties"] = rest_field() + """The compute properties of the mongo cluster.""" + backup: Optional["_models.BackupProperties"] = rest_field() + """The backup properties of the mongo cluster.""" private_endpoint_connections: Optional[List["_models.PrivateEndpointConnection"]] = rest_field( name="privateEndpointConnections", visibility=["read"] ) @@ -534,11 +652,14 @@ def __init__( create_mode: Optional[Union[str, "_models.CreateMode"]] = None, restore_parameters: Optional["_models.MongoClusterRestoreParameters"] = None, replica_parameters: Optional["_models.MongoClusterReplicaParameters"] = None, - administrator_login: Optional[str] = None, - administrator_login_password: Optional[str] = None, + administrator: Optional["_models.AdministratorProperties"] = None, server_version: Optional[str] = None, public_network_access: Optional[Union[str, "_models.PublicNetworkAccess"]] = None, - node_group_specs: Optional[List["_models.NodeGroupSpec"]] = None, + high_availability: Optional["_models.HighAvailabilityProperties"] = None, + storage: Optional["_models.StorageProperties"] = None, + sharding: Optional["_models.ShardingProperties"] = None, + compute: Optional["_models.ComputeProperties"] = None, + backup: Optional["_models.BackupProperties"] = None, preview_features: Optional[List[Union[str, "_models.PreviewFeature"]]] = None, ): ... @@ -656,35 +777,45 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useles class MongoClusterUpdateProperties(_model_base.Model): """The updatable properties of the MongoCluster. - :ivar administrator_login: The administrator's login for the mongo cluster. - :vartype administrator_login: str - :ivar administrator_login_password: The password of the administrator login. - :vartype administrator_login_password: str + :ivar administrator: The local administrator properties for the mongo cluster. + :vartype administrator: ~azure.mgmt.mongocluster.models.AdministratorProperties :ivar server_version: The Mongo DB server version. Defaults to the latest available version if not specified. :vartype server_version: str :ivar public_network_access: Whether or not public endpoint access is allowed for this mongo cluster. Known values are: "Enabled" and "Disabled". :vartype public_network_access: str or ~azure.mgmt.mongocluster.models.PublicNetworkAccess - :ivar node_group_specs: The list of node group specs in the cluster. - :vartype node_group_specs: list[~azure.mgmt.mongocluster.models.NodeGroupSpec] + :ivar high_availability: The high availability properties of the mongo cluster. + :vartype high_availability: ~azure.mgmt.mongocluster.models.HighAvailabilityProperties + :ivar storage: The storage properties of the mongo cluster. + :vartype storage: ~azure.mgmt.mongocluster.models.StorageProperties + :ivar sharding: The sharding properties of the mongo cluster. + :vartype sharding: ~azure.mgmt.mongocluster.models.ShardingProperties + :ivar compute: The compute properties of the mongo cluster. + :vartype compute: ~azure.mgmt.mongocluster.models.ComputeProperties + :ivar backup: The backup properties of the mongo cluster. + :vartype backup: ~azure.mgmt.mongocluster.models.BackupProperties :ivar preview_features: List of private endpoint connections. :vartype preview_features: list[str or ~azure.mgmt.mongocluster.models.PreviewFeature] """ - administrator_login: Optional[str] = rest_field(name="administratorLogin", visibility=["read", "create", "update"]) - """The administrator's login for the mongo cluster.""" - administrator_login_password: Optional[str] = rest_field( - name="administratorLoginPassword", visibility=["create", "update"] - ) - """The password of the administrator login.""" + administrator: Optional["_models.AdministratorProperties"] = rest_field() + """The local administrator properties for the mongo cluster.""" server_version: Optional[str] = rest_field(name="serverVersion") """The Mongo DB server version. Defaults to the latest available version if not specified.""" public_network_access: Optional[Union[str, "_models.PublicNetworkAccess"]] = rest_field(name="publicNetworkAccess") """Whether or not public endpoint access is allowed for this mongo cluster. Known values are: \"Enabled\" and \"Disabled\".""" - node_group_specs: Optional[List["_models.NodeGroupSpec"]] = rest_field(name="nodeGroupSpecs") - """The list of node group specs in the cluster.""" + high_availability: Optional["_models.HighAvailabilityProperties"] = rest_field(name="highAvailability") + """The high availability properties of the mongo cluster.""" + storage: Optional["_models.StorageProperties"] = rest_field() + """The storage properties of the mongo cluster.""" + sharding: Optional["_models.ShardingProperties"] = rest_field() + """The sharding properties of the mongo cluster.""" + compute: Optional["_models.ComputeProperties"] = rest_field() + """The compute properties of the mongo cluster.""" + backup: Optional["_models.BackupProperties"] = rest_field() + """The backup properties of the mongo cluster.""" preview_features: Optional[List[Union[str, "_models.PreviewFeature"]]] = rest_field(name="previewFeatures") """List of private endpoint connections.""" @@ -692,11 +823,14 @@ class MongoClusterUpdateProperties(_model_base.Model): def __init__( self, *, - administrator_login: Optional[str] = None, - administrator_login_password: Optional[str] = None, + administrator: Optional["_models.AdministratorProperties"] = None, server_version: Optional[str] = None, public_network_access: Optional[Union[str, "_models.PublicNetworkAccess"]] = None, - node_group_specs: Optional[List["_models.NodeGroupSpec"]] = None, + high_availability: Optional["_models.HighAvailabilityProperties"] = None, + storage: Optional["_models.StorageProperties"] = None, + sharding: Optional["_models.ShardingProperties"] = None, + compute: Optional["_models.ComputeProperties"] = None, + backup: Optional["_models.BackupProperties"] = None, preview_features: Optional[List[Union[str, "_models.PreviewFeature"]]] = None, ): ... @@ -711,57 +845,6 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useles super().__init__(*args, **kwargs) -class NodeGroupSpec(_model_base.Model): - """Specification for a node group. - - :ivar sku: The resource sku for the node group. This defines the size of CPU and memory that is - provisioned for each node. Example values: 'M30', 'M40'. - :vartype sku: str - :ivar disk_size_gb: The disk storage size for the node group in GB. Example values: 128, 256, - 512, 1024. - :vartype disk_size_gb: int - :ivar enable_ha: Whether high availability is enabled on the node group. - :vartype enable_ha: bool - :ivar kind: The node type deployed in the node group. "Shard" - :vartype kind: str or ~azure.mgmt.mongocluster.models.NodeKind - :ivar node_count: The number of nodes in the node group. - :vartype node_count: int - """ - - sku: Optional[str] = rest_field() - """The resource sku for the node group. This defines the size of CPU and memory that is - provisioned for each node. Example values: 'M30', 'M40'.""" - disk_size_gb: Optional[int] = rest_field(name="diskSizeGB") - """The disk storage size for the node group in GB. Example values: 128, 256, 512, 1024.""" - enable_ha: Optional[bool] = rest_field(name="enableHa") - """Whether high availability is enabled on the node group.""" - kind: Optional[Union[str, "_models.NodeKind"]] = rest_field() - """The node type deployed in the node group. \"Shard\"""" - node_count: Optional[int] = rest_field(name="nodeCount") - """The number of nodes in the node group.""" - - @overload - def __init__( - self, - *, - sku: Optional[str] = None, - disk_size_gb: Optional[int] = None, - enable_ha: Optional[bool] = None, - kind: Optional[Union[str, "_models.NodeKind"]] = None, - node_count: Optional[int] = None, - ): ... - - @overload - def __init__(self, mapping: Mapping[str, Any]): - """ - :param mapping: raw JSON to initialize the model. - :type mapping: Mapping[str, Any] - """ - - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation - super().__init__(*args, **kwargs) - - class Operation(_model_base.Model): """Details of a REST API operation, returned from the Resource Provider Operations API. @@ -1229,6 +1312,64 @@ class ReplicationProperties(_model_base.Model): \"Provisioning\", \"Updating\", \"Broken\", and \"Reconfiguring\".""" +class ShardingProperties(_model_base.Model): + """The sharding properties of the cluster. This includes the shard count and scaling options for + the cluster. + + :ivar shard_count: Number of shards to provision on the cluster. + :vartype shard_count: int + """ + + shard_count: Optional[int] = rest_field(name="shardCount") + """Number of shards to provision on the cluster.""" + + @overload + def __init__( + self, + *, + shard_count: Optional[int] = None, + ): ... + + @overload + def __init__(self, mapping: Mapping[str, Any]): + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + super().__init__(*args, **kwargs) + + +class StorageProperties(_model_base.Model): + """The storage properties of the cluster. This includes the data storage size and scaling applied + to servers in the cluster. + + :ivar size_gb: The size of the data disk assigned to each server. + :vartype size_gb: int + """ + + size_gb: Optional[int] = rest_field(name="sizeGb") + """The size of the data disk assigned to each server.""" + + @overload + def __init__( + self, + *, + size_gb: Optional[int] = None, + ): ... + + @overload + def __init__(self, mapping: Mapping[str, Any]): + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + super().__init__(*args, **kwargs) + + class SystemData(_model_base.Model): """Metadata pertaining to creation and last modification of the resource. diff --git a/sdk/mongocluster/azure-mgmt-mongocluster/azure/mgmt/mongocluster/operations/_operations.py b/sdk/mongocluster/azure-mgmt-mongocluster/azure/mgmt/mongocluster/operations/_operations.py index 195e54176416..d5b197cabcde 100644 --- a/sdk/mongocluster/azure-mgmt-mongocluster/azure/mgmt/mongocluster/operations/_operations.py +++ b/sdk/mongocluster/azure-mgmt-mongocluster/azure/mgmt/mongocluster/operations/_operations.py @@ -52,7 +52,7 @@ def build_operations_list_request(**kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-06-01-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -73,7 +73,7 @@ def build_mongo_clusters_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-06-01-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -102,7 +102,7 @@ def build_mongo_clusters_create_or_update_request( # pylint: disable=name-too-l _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-06-01-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -133,7 +133,7 @@ def build_mongo_clusters_update_request( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-06-01-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -163,7 +163,7 @@ def build_mongo_clusters_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-06-01-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -191,7 +191,7 @@ def build_mongo_clusters_list_by_resource_group_request( # pylint: disable=name _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-06-01-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -216,7 +216,7 @@ def build_mongo_clusters_list_request(subscription_id: str, **kwargs: Any) -> Ht _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-06-01-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -242,7 +242,7 @@ def build_mongo_clusters_list_connection_strings_request( # pylint: disable=nam _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-06-01-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -271,7 +271,7 @@ def build_mongo_clusters_check_name_availability_request( # pylint: disable=nam _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-06-01-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -301,7 +301,7 @@ def build_mongo_clusters_promote_request( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-06-01-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -331,7 +331,7 @@ def build_firewall_rules_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-06-01-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -361,7 +361,7 @@ def build_firewall_rules_create_or_update_request( # pylint: disable=name-too-l _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-06-01-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -392,7 +392,7 @@ def build_firewall_rules_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-06-01-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -421,7 +421,7 @@ def build_firewall_rules_list_by_mongo_cluster_request( # pylint: disable=name- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-06-01-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -449,7 +449,7 @@ def build_private_endpoint_connections_list_by_mongo_cluster_request( # pylint: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-06-01-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -481,7 +481,7 @@ def build_private_endpoint_connections_get_request( # pylint: disable=name-too- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-06-01-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -517,7 +517,7 @@ def build_private_endpoint_connections_create_request( # pylint: disable=name-t _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-06-01-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -554,7 +554,7 @@ def build_private_endpoint_connections_delete_request( # pylint: disable=name-t _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-06-01-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -585,7 +585,7 @@ def build_private_links_list_by_mongo_cluster_request( # pylint: disable=name-t _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-06-01-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -613,7 +613,7 @@ def build_replicas_list_by_parent_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-06-01-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-07-01")) accept = _headers.pop("Accept", "application/json") # Construct URL diff --git a/sdk/mongocluster/azure-mgmt-mongocluster/generated_samples/mongo_clusters_create.py b/sdk/mongocluster/azure-mgmt-mongocluster/generated_samples/mongo_clusters_create.py index 38d6a5969575..0c9ca9ac7a68 100644 --- a/sdk/mongocluster/azure-mgmt-mongocluster/generated_samples/mongo_clusters_create.py +++ b/sdk/mongocluster/azure-mgmt-mongocluster/generated_samples/mongo_clusters_create.py @@ -36,18 +36,18 @@ def main(): resource={ "location": "westus2", "properties": { - "administratorLogin": "mongoAdmin", - "administratorLoginPassword": "password", - "nodeGroupSpecs": [ - {"diskSizeGB": 128, "enableHa": True, "kind": "Shard", "nodeCount": 1, "sku": "M30"} - ], + "administrator": {"password": "password", "userName": "mongoAdmin"}, + "compute": {"tier": "M30"}, + "highAvailability": {"targetMode": "SameZone"}, "serverVersion": "5.0", + "sharding": {"shardCount": 1}, + "storage": {"sizeGb": 128}, }, }, ).result() print(response) -# x-ms-original-file: 2024-06-01-preview/MongoClusters_Create.json +# x-ms-original-file: 2024-07-01/MongoClusters_Create.json if __name__ == "__main__": main() diff --git a/sdk/mongocluster/azure-mgmt-mongocluster/generated_samples/mongo_clusters_create_geo_replica.py b/sdk/mongocluster/azure-mgmt-mongocluster/generated_samples/mongo_clusters_create_geo_replica.py index 4d185bdcd549..478375d13e19 100644 --- a/sdk/mongocluster/azure-mgmt-mongocluster/generated_samples/mongo_clusters_create_geo_replica.py +++ b/sdk/mongocluster/azure-mgmt-mongocluster/generated_samples/mongo_clusters_create_geo_replica.py @@ -47,6 +47,6 @@ def main(): print(response) -# x-ms-original-file: 2024-06-01-preview/MongoClusters_CreateGeoReplica.json +# x-ms-original-file: 2024-07-01/MongoClusters_CreateGeoReplica.json if __name__ == "__main__": main() diff --git a/sdk/mongocluster/azure-mgmt-mongocluster/generated_samples/mongo_clusters_create_pitr.py b/sdk/mongocluster/azure-mgmt-mongocluster/generated_samples/mongo_clusters_create_pitr.py index 69aeab90f3ae..bbc19a418909 100644 --- a/sdk/mongocluster/azure-mgmt-mongocluster/generated_samples/mongo_clusters_create_pitr.py +++ b/sdk/mongocluster/azure-mgmt-mongocluster/generated_samples/mongo_clusters_create_pitr.py @@ -47,6 +47,6 @@ def main(): print(response) -# x-ms-original-file: 2024-06-01-preview/MongoClusters_CreatePITR.json +# x-ms-original-file: 2024-07-01/MongoClusters_CreatePITR.json if __name__ == "__main__": main() diff --git a/sdk/mongocluster/azure-mgmt-mongocluster/generated_samples/mongo_clusters_delete.py b/sdk/mongocluster/azure-mgmt-mongocluster/generated_samples/mongo_clusters_delete.py index 0028b70b08b0..8c9dedf1d90f 100644 --- a/sdk/mongocluster/azure-mgmt-mongocluster/generated_samples/mongo_clusters_delete.py +++ b/sdk/mongocluster/azure-mgmt-mongocluster/generated_samples/mongo_clusters_delete.py @@ -36,6 +36,6 @@ def main(): ).result() -# x-ms-original-file: 2024-06-01-preview/MongoClusters_Delete.json +# x-ms-original-file: 2024-07-01/MongoClusters_Delete.json if __name__ == "__main__": main() diff --git a/sdk/mongocluster/azure-mgmt-mongocluster/generated_samples/mongo_clusters_firewall_rule_create.py b/sdk/mongocluster/azure-mgmt-mongocluster/generated_samples/mongo_clusters_firewall_rule_create.py index cf75ac2e252d..8c37ec59ae62 100644 --- a/sdk/mongocluster/azure-mgmt-mongocluster/generated_samples/mongo_clusters_firewall_rule_create.py +++ b/sdk/mongocluster/azure-mgmt-mongocluster/generated_samples/mongo_clusters_firewall_rule_create.py @@ -39,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: 2024-06-01-preview/MongoClusters_FirewallRuleCreate.json +# x-ms-original-file: 2024-07-01/MongoClusters_FirewallRuleCreate.json if __name__ == "__main__": main() diff --git a/sdk/mongocluster/azure-mgmt-mongocluster/generated_samples/mongo_clusters_firewall_rule_delete.py b/sdk/mongocluster/azure-mgmt-mongocluster/generated_samples/mongo_clusters_firewall_rule_delete.py index d23efc0885f5..8a01ba9d6a91 100644 --- a/sdk/mongocluster/azure-mgmt-mongocluster/generated_samples/mongo_clusters_firewall_rule_delete.py +++ b/sdk/mongocluster/azure-mgmt-mongocluster/generated_samples/mongo_clusters_firewall_rule_delete.py @@ -37,6 +37,6 @@ def main(): ).result() -# x-ms-original-file: 2024-06-01-preview/MongoClusters_FirewallRuleDelete.json +# x-ms-original-file: 2024-07-01/MongoClusters_FirewallRuleDelete.json if __name__ == "__main__": main() diff --git a/sdk/mongocluster/azure-mgmt-mongocluster/generated_samples/mongo_clusters_firewall_rule_get.py b/sdk/mongocluster/azure-mgmt-mongocluster/generated_samples/mongo_clusters_firewall_rule_get.py index 135a9e131a62..e1fa3973c747 100644 --- a/sdk/mongocluster/azure-mgmt-mongocluster/generated_samples/mongo_clusters_firewall_rule_get.py +++ b/sdk/mongocluster/azure-mgmt-mongocluster/generated_samples/mongo_clusters_firewall_rule_get.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: 2024-06-01-preview/MongoClusters_FirewallRuleGet.json +# x-ms-original-file: 2024-07-01/MongoClusters_FirewallRuleGet.json if __name__ == "__main__": main() diff --git a/sdk/mongocluster/azure-mgmt-mongocluster/generated_samples/mongo_clusters_firewall_rule_list.py b/sdk/mongocluster/azure-mgmt-mongocluster/generated_samples/mongo_clusters_firewall_rule_list.py index 2f347895ec77..2f8d653da357 100644 --- a/sdk/mongocluster/azure-mgmt-mongocluster/generated_samples/mongo_clusters_firewall_rule_list.py +++ b/sdk/mongocluster/azure-mgmt-mongocluster/generated_samples/mongo_clusters_firewall_rule_list.py @@ -38,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: 2024-06-01-preview/MongoClusters_FirewallRuleList.json +# x-ms-original-file: 2024-07-01/MongoClusters_FirewallRuleList.json if __name__ == "__main__": main() diff --git a/sdk/mongocluster/azure-mgmt-mongocluster/generated_samples/mongo_clusters_force_promote_replica.py b/sdk/mongocluster/azure-mgmt-mongocluster/generated_samples/mongo_clusters_force_promote_replica.py index 5f983225b7dc..18d52b74fefa 100644 --- a/sdk/mongocluster/azure-mgmt-mongocluster/generated_samples/mongo_clusters_force_promote_replica.py +++ b/sdk/mongocluster/azure-mgmt-mongocluster/generated_samples/mongo_clusters_force_promote_replica.py @@ -37,6 +37,6 @@ def main(): ).result() -# x-ms-original-file: 2024-06-01-preview/MongoClusters_ForcePromoteReplica.json +# x-ms-original-file: 2024-07-01/MongoClusters_ForcePromoteReplica.json if __name__ == "__main__": main() diff --git a/sdk/mongocluster/azure-mgmt-mongocluster/generated_samples/mongo_clusters_get.py b/sdk/mongocluster/azure-mgmt-mongocluster/generated_samples/mongo_clusters_get.py index 6c2232842816..0aadca7b500e 100644 --- a/sdk/mongocluster/azure-mgmt-mongocluster/generated_samples/mongo_clusters_get.py +++ b/sdk/mongocluster/azure-mgmt-mongocluster/generated_samples/mongo_clusters_get.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: 2024-06-01-preview/MongoClusters_Get.json +# x-ms-original-file: 2024-07-01/MongoClusters_Get.json if __name__ == "__main__": main() diff --git a/sdk/mongocluster/azure-mgmt-mongocluster/generated_samples/mongo_clusters_list.py b/sdk/mongocluster/azure-mgmt-mongocluster/generated_samples/mongo_clusters_list.py index 15ea44be65dd..7a526e9e56a1 100644 --- a/sdk/mongocluster/azure-mgmt-mongocluster/generated_samples/mongo_clusters_list.py +++ b/sdk/mongocluster/azure-mgmt-mongocluster/generated_samples/mongo_clusters_list.py @@ -35,6 +35,6 @@ def main(): print(item) -# x-ms-original-file: 2024-06-01-preview/MongoClusters_List.json +# x-ms-original-file: 2024-07-01/MongoClusters_List.json if __name__ == "__main__": main() diff --git a/sdk/mongocluster/azure-mgmt-mongocluster/generated_samples/mongo_clusters_list_by_resource_group.py b/sdk/mongocluster/azure-mgmt-mongocluster/generated_samples/mongo_clusters_list_by_resource_group.py index a34e5eb636a4..fd3668444f5a 100644 --- a/sdk/mongocluster/azure-mgmt-mongocluster/generated_samples/mongo_clusters_list_by_resource_group.py +++ b/sdk/mongocluster/azure-mgmt-mongocluster/generated_samples/mongo_clusters_list_by_resource_group.py @@ -37,6 +37,6 @@ def main(): print(item) -# x-ms-original-file: 2024-06-01-preview/MongoClusters_ListByResourceGroup.json +# x-ms-original-file: 2024-07-01/MongoClusters_ListByResourceGroup.json if __name__ == "__main__": main() diff --git a/sdk/mongocluster/azure-mgmt-mongocluster/generated_samples/mongo_clusters_list_connection_strings.py b/sdk/mongocluster/azure-mgmt-mongocluster/generated_samples/mongo_clusters_list_connection_strings.py index f646f554ca4e..7fcbf7399c6d 100644 --- a/sdk/mongocluster/azure-mgmt-mongocluster/generated_samples/mongo_clusters_list_connection_strings.py +++ b/sdk/mongocluster/azure-mgmt-mongocluster/generated_samples/mongo_clusters_list_connection_strings.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: 2024-06-01-preview/MongoClusters_ListConnectionStrings.json +# x-ms-original-file: 2024-07-01/MongoClusters_ListConnectionStrings.json if __name__ == "__main__": main() diff --git a/sdk/mongocluster/azure-mgmt-mongocluster/generated_samples/mongo_clusters_name_availability.py b/sdk/mongocluster/azure-mgmt-mongocluster/generated_samples/mongo_clusters_name_availability.py index bc3862eece9b..b346f7ce5939 100644 --- a/sdk/mongocluster/azure-mgmt-mongocluster/generated_samples/mongo_clusters_name_availability.py +++ b/sdk/mongocluster/azure-mgmt-mongocluster/generated_samples/mongo_clusters_name_availability.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: 2024-06-01-preview/MongoClusters_NameAvailability.json +# x-ms-original-file: 2024-07-01/MongoClusters_NameAvailability.json if __name__ == "__main__": main() diff --git a/sdk/mongocluster/azure-mgmt-mongocluster/generated_samples/mongo_clusters_name_availability_already_exists.py b/sdk/mongocluster/azure-mgmt-mongocluster/generated_samples/mongo_clusters_name_availability_already_exists.py index 2ee5ab42c446..d55107e72039 100644 --- a/sdk/mongocluster/azure-mgmt-mongocluster/generated_samples/mongo_clusters_name_availability_already_exists.py +++ b/sdk/mongocluster/azure-mgmt-mongocluster/generated_samples/mongo_clusters_name_availability_already_exists.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: 2024-06-01-preview/MongoClusters_NameAvailability_AlreadyExists.json +# x-ms-original-file: 2024-07-01/MongoClusters_NameAvailability_AlreadyExists.json if __name__ == "__main__": main() diff --git a/sdk/mongocluster/azure-mgmt-mongocluster/generated_samples/mongo_clusters_patch_disk_size.py b/sdk/mongocluster/azure-mgmt-mongocluster/generated_samples/mongo_clusters_patch_disk_size.py index ec2355d18af5..d5b050f071af 100644 --- a/sdk/mongocluster/azure-mgmt-mongocluster/generated_samples/mongo_clusters_patch_disk_size.py +++ b/sdk/mongocluster/azure-mgmt-mongocluster/generated_samples/mongo_clusters_patch_disk_size.py @@ -33,11 +33,11 @@ def main(): response = client.mongo_clusters.begin_update( resource_group_name="TestResourceGroup", mongo_cluster_name="myMongoCluster", - properties={"properties": {"nodeGroupSpecs": [{"diskSizeGB": 256, "kind": "Shard"}]}}, + properties={"properties": {"storage": {"sizeGb": 256}}}, ).result() print(response) -# x-ms-original-file: 2024-06-01-preview/MongoClusters_PatchDiskSize.json +# x-ms-original-file: 2024-07-01/MongoClusters_PatchDiskSize.json if __name__ == "__main__": main() diff --git a/sdk/mongocluster/azure-mgmt-mongocluster/generated_samples/mongo_clusters_patch_private_network_access.py b/sdk/mongocluster/azure-mgmt-mongocluster/generated_samples/mongo_clusters_patch_private_network_access.py index a4227298b5ef..1a3e65678149 100644 --- a/sdk/mongocluster/azure-mgmt-mongocluster/generated_samples/mongo_clusters_patch_private_network_access.py +++ b/sdk/mongocluster/azure-mgmt-mongocluster/generated_samples/mongo_clusters_patch_private_network_access.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: 2024-06-01-preview/MongoClusters_PatchPrivateNetworkAccess.json +# x-ms-original-file: 2024-07-01/MongoClusters_PatchPrivateNetworkAccess.json if __name__ == "__main__": main() diff --git a/sdk/mongocluster/azure-mgmt-mongocluster/generated_samples/mongo_clusters_private_endpoint_connection_delete.py b/sdk/mongocluster/azure-mgmt-mongocluster/generated_samples/mongo_clusters_private_endpoint_connection_delete.py index eed468025c9e..088f48dc338a 100644 --- a/sdk/mongocluster/azure-mgmt-mongocluster/generated_samples/mongo_clusters_private_endpoint_connection_delete.py +++ b/sdk/mongocluster/azure-mgmt-mongocluster/generated_samples/mongo_clusters_private_endpoint_connection_delete.py @@ -37,6 +37,6 @@ def main(): ).result() -# x-ms-original-file: 2024-06-01-preview/MongoClusters_PrivateEndpointConnectionDelete.json +# x-ms-original-file: 2024-07-01/MongoClusters_PrivateEndpointConnectionDelete.json if __name__ == "__main__": main() diff --git a/sdk/mongocluster/azure-mgmt-mongocluster/generated_samples/mongo_clusters_private_endpoint_connection_get.py b/sdk/mongocluster/azure-mgmt-mongocluster/generated_samples/mongo_clusters_private_endpoint_connection_get.py index 7c2e8a9ef32e..4b25e0b76332 100644 --- a/sdk/mongocluster/azure-mgmt-mongocluster/generated_samples/mongo_clusters_private_endpoint_connection_get.py +++ b/sdk/mongocluster/azure-mgmt-mongocluster/generated_samples/mongo_clusters_private_endpoint_connection_get.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: 2024-06-01-preview/MongoClusters_PrivateEndpointConnectionGet.json +# x-ms-original-file: 2024-07-01/MongoClusters_PrivateEndpointConnectionGet.json if __name__ == "__main__": main() diff --git a/sdk/mongocluster/azure-mgmt-mongocluster/generated_samples/mongo_clusters_private_endpoint_connection_list.py b/sdk/mongocluster/azure-mgmt-mongocluster/generated_samples/mongo_clusters_private_endpoint_connection_list.py index 1f5fcbc7ea37..875ed7c6d7f5 100644 --- a/sdk/mongocluster/azure-mgmt-mongocluster/generated_samples/mongo_clusters_private_endpoint_connection_list.py +++ b/sdk/mongocluster/azure-mgmt-mongocluster/generated_samples/mongo_clusters_private_endpoint_connection_list.py @@ -38,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: 2024-06-01-preview/MongoClusters_PrivateEndpointConnectionList.json +# x-ms-original-file: 2024-07-01/MongoClusters_PrivateEndpointConnectionList.json if __name__ == "__main__": main() diff --git a/sdk/mongocluster/azure-mgmt-mongocluster/generated_samples/mongo_clusters_private_endpoint_connection_put.py b/sdk/mongocluster/azure-mgmt-mongocluster/generated_samples/mongo_clusters_private_endpoint_connection_put.py index a6eb19f58f3d..07f5a9a2bd78 100644 --- a/sdk/mongocluster/azure-mgmt-mongocluster/generated_samples/mongo_clusters_private_endpoint_connection_put.py +++ b/sdk/mongocluster/azure-mgmt-mongocluster/generated_samples/mongo_clusters_private_endpoint_connection_put.py @@ -41,6 +41,6 @@ def main(): print(response) -# x-ms-original-file: 2024-06-01-preview/MongoClusters_PrivateEndpointConnectionPut.json +# x-ms-original-file: 2024-07-01/MongoClusters_PrivateEndpointConnectionPut.json if __name__ == "__main__": main() diff --git a/sdk/mongocluster/azure-mgmt-mongocluster/generated_samples/mongo_clusters_private_link_resource_list.py b/sdk/mongocluster/azure-mgmt-mongocluster/generated_samples/mongo_clusters_private_link_resource_list.py index 5291df343f6f..2026fb4bfffe 100644 --- a/sdk/mongocluster/azure-mgmt-mongocluster/generated_samples/mongo_clusters_private_link_resource_list.py +++ b/sdk/mongocluster/azure-mgmt-mongocluster/generated_samples/mongo_clusters_private_link_resource_list.py @@ -38,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: 2024-06-01-preview/MongoClusters_PrivateLinkResourceList.json +# x-ms-original-file: 2024-07-01/MongoClusters_PrivateLinkResourceList.json if __name__ == "__main__": main() diff --git a/sdk/mongocluster/azure-mgmt-mongocluster/generated_samples/mongo_clusters_replica_list.py b/sdk/mongocluster/azure-mgmt-mongocluster/generated_samples/mongo_clusters_replica_list.py index 3d76cb459702..f22f11480bd7 100644 --- a/sdk/mongocluster/azure-mgmt-mongocluster/generated_samples/mongo_clusters_replica_list.py +++ b/sdk/mongocluster/azure-mgmt-mongocluster/generated_samples/mongo_clusters_replica_list.py @@ -38,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: 2024-06-01-preview/MongoClusters_ReplicaList.json +# x-ms-original-file: 2024-07-01/MongoClusters_ReplicaList.json if __name__ == "__main__": main() diff --git a/sdk/mongocluster/azure-mgmt-mongocluster/generated_samples/mongo_clusters_reset_password.py b/sdk/mongocluster/azure-mgmt-mongocluster/generated_samples/mongo_clusters_reset_password.py index 87ef7782536e..d5eaa01866e2 100644 --- a/sdk/mongocluster/azure-mgmt-mongocluster/generated_samples/mongo_clusters_reset_password.py +++ b/sdk/mongocluster/azure-mgmt-mongocluster/generated_samples/mongo_clusters_reset_password.py @@ -33,11 +33,11 @@ def main(): response = client.mongo_clusters.begin_update( resource_group_name="TestResourceGroup", mongo_cluster_name="myMongoCluster", - properties={"properties": {"administratorLogin": "mongoAdmin", "administratorLoginPassword": "password"}}, + properties={"properties": {"administrator": {"password": "password", "userName": "mongoAdmin"}}}, ).result() print(response) -# x-ms-original-file: 2024-06-01-preview/MongoClusters_ResetPassword.json +# x-ms-original-file: 2024-07-01/MongoClusters_ResetPassword.json if __name__ == "__main__": main() diff --git a/sdk/mongocluster/azure-mgmt-mongocluster/generated_samples/mongo_clusters_update.py b/sdk/mongocluster/azure-mgmt-mongocluster/generated_samples/mongo_clusters_update.py index 5118d23507d2..16bbc5422c0c 100644 --- a/sdk/mongocluster/azure-mgmt-mongocluster/generated_samples/mongo_clusters_update.py +++ b/sdk/mongocluster/azure-mgmt-mongocluster/generated_samples/mongo_clusters_update.py @@ -35,19 +35,20 @@ def main(): mongo_cluster_name="myMongoCluster", properties={ "properties": { - "administratorLogin": "mongoAdmin", - "administratorLoginPassword": "password", - "nodeGroupSpecs": [ - {"diskSizeGB": 256, "enableHa": True, "kind": "Shard", "nodeCount": 1, "sku": "M50"} - ], + "administrator": {"userName": "mongoAdmin"}, + "compute": {"tier": "M50"}, + "highAvailability": {"targetMode": "SameZone"}, + "previewFeatures": [], "publicNetworkAccess": "Enabled", "serverVersion": "5.0", + "sharding": {"shardCount": 4}, + "storage": {"sizeGb": 256}, } }, ).result() print(response) -# x-ms-original-file: 2024-06-01-preview/MongoClusters_Update.json +# x-ms-original-file: 2024-07-01/MongoClusters_Update.json if __name__ == "__main__": main() diff --git a/sdk/mongocluster/azure-mgmt-mongocluster/generated_samples/operations_list.py b/sdk/mongocluster/azure-mgmt-mongocluster/generated_samples/operations_list.py index ff0b7606af9e..062d83ab92c3 100644 --- a/sdk/mongocluster/azure-mgmt-mongocluster/generated_samples/operations_list.py +++ b/sdk/mongocluster/azure-mgmt-mongocluster/generated_samples/operations_list.py @@ -35,6 +35,6 @@ def main(): print(item) -# x-ms-original-file: 2024-06-01-preview/Operations_List.json +# x-ms-original-file: 2024-07-01/Operations_List.json if __name__ == "__main__": main() diff --git a/sdk/mongocluster/azure-mgmt-mongocluster/generated_tests/test_mongo_cluster_mgmt_mongo_clusters_operations.py b/sdk/mongocluster/azure-mgmt-mongocluster/generated_tests/test_mongo_cluster_mgmt_mongo_clusters_operations.py index b25e70541922..a70bf65845e6 100644 --- a/sdk/mongocluster/azure-mgmt-mongocluster/generated_tests/test_mongo_cluster_mgmt_mongo_clusters_operations.py +++ b/sdk/mongocluster/azure-mgmt-mongocluster/generated_tests/test_mongo_cluster_mgmt_mongo_clusters_operations.py @@ -40,16 +40,14 @@ def test_mongo_clusters_begin_create_or_update(self, resource_group): "id": "str", "name": "str", "properties": { - "administratorLogin": "str", - "administratorLoginPassword": "str", + "administrator": {"password": "str", "userName": "str"}, + "backup": {"earliestRestoreTime": "str"}, "clusterStatus": "str", + "compute": {"tier": "str"}, "connectionString": "str", "createMode": "str", - "earliestRestoreTime": "str", + "highAvailability": {"targetMode": "str"}, "infrastructureVersion": "str", - "nodeGroupSpecs": [ - {"diskSizeGB": 0, "enableHa": bool, "kind": "str", "nodeCount": 0, "sku": "str"} - ], "previewFeatures": ["str"], "privateEndpointConnections": [ { @@ -82,6 +80,8 @@ def test_mongo_clusters_begin_create_or_update(self, resource_group): "replicaParameters": {"sourceLocation": "str", "sourceResourceId": "str"}, "restoreParameters": {"pointInTimeUTC": "2020-02-20 00:00:00", "sourceResourceId": "str"}, "serverVersion": "str", + "sharding": {"shardCount": 0}, + "storage": {"sizeGb": 0}, }, "systemData": { "createdAt": "2020-02-20 00:00:00", @@ -107,14 +107,15 @@ def test_mongo_clusters_begin_update(self, resource_group): mongo_cluster_name="str", properties={ "properties": { - "administratorLogin": "str", - "administratorLoginPassword": "str", - "nodeGroupSpecs": [ - {"diskSizeGB": 0, "enableHa": bool, "kind": "str", "nodeCount": 0, "sku": "str"} - ], + "administrator": {"password": "str", "userName": "str"}, + "backup": {"earliestRestoreTime": "str"}, + "compute": {"tier": "str"}, + "highAvailability": {"targetMode": "str"}, "previewFeatures": ["str"], "publicNetworkAccess": "str", "serverVersion": "str", + "sharding": {"shardCount": 0}, + "storage": {"sizeGb": 0}, }, "tags": {"str": "str"}, }, diff --git a/sdk/mongocluster/azure-mgmt-mongocluster/generated_tests/test_mongo_cluster_mgmt_mongo_clusters_operations_async.py b/sdk/mongocluster/azure-mgmt-mongocluster/generated_tests/test_mongo_cluster_mgmt_mongo_clusters_operations_async.py index c1246795a8f2..854e0d8a44d1 100644 --- a/sdk/mongocluster/azure-mgmt-mongocluster/generated_tests/test_mongo_cluster_mgmt_mongo_clusters_operations_async.py +++ b/sdk/mongocluster/azure-mgmt-mongocluster/generated_tests/test_mongo_cluster_mgmt_mongo_clusters_operations_async.py @@ -42,16 +42,14 @@ async def test_mongo_clusters_begin_create_or_update(self, resource_group): "id": "str", "name": "str", "properties": { - "administratorLogin": "str", - "administratorLoginPassword": "str", + "administrator": {"password": "str", "userName": "str"}, + "backup": {"earliestRestoreTime": "str"}, "clusterStatus": "str", + "compute": {"tier": "str"}, "connectionString": "str", "createMode": "str", - "earliestRestoreTime": "str", + "highAvailability": {"targetMode": "str"}, "infrastructureVersion": "str", - "nodeGroupSpecs": [ - {"diskSizeGB": 0, "enableHa": bool, "kind": "str", "nodeCount": 0, "sku": "str"} - ], "previewFeatures": ["str"], "privateEndpointConnections": [ { @@ -84,6 +82,8 @@ async def test_mongo_clusters_begin_create_or_update(self, resource_group): "replicaParameters": {"sourceLocation": "str", "sourceResourceId": "str"}, "restoreParameters": {"pointInTimeUTC": "2020-02-20 00:00:00", "sourceResourceId": "str"}, "serverVersion": "str", + "sharding": {"shardCount": 0}, + "storage": {"sizeGb": 0}, }, "systemData": { "createdAt": "2020-02-20 00:00:00", @@ -111,14 +111,15 @@ async def test_mongo_clusters_begin_update(self, resource_group): mongo_cluster_name="str", properties={ "properties": { - "administratorLogin": "str", - "administratorLoginPassword": "str", - "nodeGroupSpecs": [ - {"diskSizeGB": 0, "enableHa": bool, "kind": "str", "nodeCount": 0, "sku": "str"} - ], + "administrator": {"password": "str", "userName": "str"}, + "backup": {"earliestRestoreTime": "str"}, + "compute": {"tier": "str"}, + "highAvailability": {"targetMode": "str"}, "previewFeatures": ["str"], "publicNetworkAccess": "str", "serverVersion": "str", + "sharding": {"shardCount": 0}, + "storage": {"sizeGb": 0}, }, "tags": {"str": "str"}, }, diff --git a/sdk/mongocluster/azure-mgmt-mongocluster/sdk_packaging.toml b/sdk/mongocluster/azure-mgmt-mongocluster/sdk_packaging.toml index 7ddab9afcdde..fe93999c88c1 100644 --- a/sdk/mongocluster/azure-mgmt-mongocluster/sdk_packaging.toml +++ b/sdk/mongocluster/azure-mgmt-mongocluster/sdk_packaging.toml @@ -3,7 +3,7 @@ package_name = "azure-mgmt-mongocluster" package_nspkg = "azure-mgmt-nspkg" package_pprint_name = "Mongocluster Management" package_doc_id = "" -is_stable = false +is_stable = true is_arm = true need_msrestazure = false need_azuremgmtcore = true diff --git a/sdk/mongocluster/azure-mgmt-mongocluster/setup.py b/sdk/mongocluster/azure-mgmt-mongocluster/setup.py index 31ba7938cc56..e977f9f289c3 100644 --- a/sdk/mongocluster/azure-mgmt-mongocluster/setup.py +++ b/sdk/mongocluster/azure-mgmt-mongocluster/setup.py @@ -49,7 +49,7 @@ url="https://github.com/Azure/azure-sdk-for-python", keywords="azure, azure sdk", # update with search keywords relevant to the azure service / product classifiers=[ - "Development Status :: 4 - Beta", + "Development Status :: 5 - Production/Stable", "Programming Language :: Python", "Programming Language :: Python :: 3 :: Only", "Programming Language :: Python :: 3", diff --git a/sdk/mongocluster/azure-mgmt-mongocluster/tests/conftest.py b/sdk/mongocluster/azure-mgmt-mongocluster/tests/conftest.py index 85d1adc3301c..592a96fc2da3 100644 --- a/sdk/mongocluster/azure-mgmt-mongocluster/tests/conftest.py +++ b/sdk/mongocluster/azure-mgmt-mongocluster/tests/conftest.py @@ -1,51 +1,35 @@ +# coding=utf-8 # -------------------------------------------------------------------------- -# # Copyright (c) Microsoft Corporation. All rights reserved. -# -# The MIT License (MIT) -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the ""Software""), to -# deal in the Software without restriction, including without limitation the -# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -# sell copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -# IN THE SOFTWARE. -# +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import os -import platform import pytest -import sys - from dotenv import load_dotenv - -from devtools_testutils import test_proxy, add_general_regex_sanitizer -from devtools_testutils import add_header_regex_sanitizer, add_body_key_sanitizer +from devtools_testutils import ( + test_proxy, + add_general_regex_sanitizer, + add_body_key_sanitizer, + add_header_regex_sanitizer, +) load_dotenv() +# For security, please avoid record sensitive identity information in recordings @pytest.fixture(scope="session", autouse=True) def add_sanitizers(test_proxy): - subscription_id = os.environ.get("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") - tenant_id = os.environ.get("AZURE_TENANT_ID", "00000000-0000-0000-0000-000000000000") - client_id = os.environ.get("AZURE_CLIENT_ID", "00000000-0000-0000-0000-000000000000") - client_secret = os.environ.get("AZURE_CLIENT_SECRET", "00000000-0000-0000-0000-000000000000") - add_general_regex_sanitizer(regex=subscription_id, value="00000000-0000-0000-0000-000000000000") - add_general_regex_sanitizer(regex=tenant_id, value="00000000-0000-0000-0000-000000000000") - add_general_regex_sanitizer(regex=client_id, value="00000000-0000-0000-0000-000000000000") - add_general_regex_sanitizer(regex=client_secret, value="00000000-0000-0000-0000-000000000000") + mongoclustermgmt_subscription_id = os.environ.get("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") + mongoclustermgmt_tenant_id = os.environ.get("AZURE_TENANT_ID", "00000000-0000-0000-0000-000000000000") + mongoclustermgmt_client_id = os.environ.get("AZURE_CLIENT_ID", "00000000-0000-0000-0000-000000000000") + mongoclustermgmt_client_secret = os.environ.get("AZURE_CLIENT_SECRET", "00000000-0000-0000-0000-000000000000") + add_general_regex_sanitizer(regex=mongoclustermgmt_subscription_id, value="00000000-0000-0000-0000-000000000000") + add_general_regex_sanitizer(regex=mongoclustermgmt_tenant_id, value="00000000-0000-0000-0000-000000000000") + add_general_regex_sanitizer(regex=mongoclustermgmt_client_id, value="00000000-0000-0000-0000-000000000000") + add_general_regex_sanitizer(regex=mongoclustermgmt_client_secret, value="00000000-0000-0000-0000-000000000000") + add_header_regex_sanitizer(key="Set-Cookie", value="[set-cookie;]") add_header_regex_sanitizer(key="Cookie", value="cookie;") add_body_key_sanitizer(json_path="$..access_token", value="access_token") diff --git a/sdk/mongocluster/azure-mgmt-mongocluster/tests/test_cli_mgmt_mongocluster_lro_test.py b/sdk/mongocluster/azure-mgmt-mongocluster/tests/test_cli_mgmt_mongocluster_lro_test.py index c971da9e6e33..24e1c5fa4afe 100644 --- a/sdk/mongocluster/azure-mgmt-mongocluster/tests/test_cli_mgmt_mongocluster_lro_test.py +++ b/sdk/mongocluster/azure-mgmt-mongocluster/tests/test_cli_mgmt_mongocluster_lro_test.py @@ -1,9 +1,9 @@ -import pytest from azure.mgmt.mongocluster import MongoClusterMgmtClient from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy +import pytest AZURE_LOCATION = "westus2" -Mongo_Cluster_Name = "pythontestmongocluster" +Mongo_Cluster_Name = "pythonmongoclustertest" @pytest.mark.live_test_only class TestMgmtMongoCluster(AzureMgmtRecordedTestCase): @@ -20,12 +20,12 @@ def test_mongo_clusters_mgmt(self, resource_group): resource={ "location": AZURE_LOCATION, "properties": { - "administratorLogin": "myMongoCluster", - "administratorLoginPassword": "myMongoCluster333", + "administrator": {"password": "mongoAdmin3", "userName": "mongoAdmin"}, + "compute": {"tier": "M30"}, + "highAvailability": {"targetMode": "Disabled"}, "serverVersion": "5.0", - "nodeGroupSpecs": [ - {"diskSizeGB": 128, "enableHa": True, "kind": "Shard", "nodeCount": 1, "sku": "M30"} - ], + "sharding": {"shardCount": 1}, + "storage": {"sizeGb": 128}, }, }, ).result() @@ -37,13 +37,13 @@ def test_mongo_clusters_mgmt(self, resource_group): properties={ "location": AZURE_LOCATION, "properties": { - "administratorLogin": "myMongoCluster", - "administratorLoginPassword": "myMongoCluster333", - "serverVersion": "5.0", - "nodeGroupSpecs": [ - {"kind": "Shard", "sku": "M50", "diskSizeGB": 256, "enableHa": True, "nodeCount": 1} - ], + "administrator": {"userName": "mongoAdmin"}, + "compute": {"tier": "M50"}, + "highAvailability": {"targetMode": "Disabled"}, + "previewFeatures": [], "publicNetworkAccess": "Enabled", + "serverVersion": "5.0", + "storage": {"sizeGb": 256}, }, }, ).result() @@ -63,4 +63,4 @@ def test_mongo_clusters_mgmt(self, resource_group): response = self.client.mongo_clusters.begin_delete( resource_group_name=resource_group.name, mongo_cluster_name=Mongo_Cluster_Name, - ).result() + ).result() \ No newline at end of file diff --git a/sdk/mongocluster/azure-mgmt-mongocluster/tests/test_mongo_cluster_mgmt_mongo_clusters_operations_test.py b/sdk/mongocluster/azure-mgmt-mongocluster/tests/test_mongo_cluster_mgmt_mongo_clusters_operations_test.py index 10a4f05a5bd1..daf0de490908 100644 --- a/sdk/mongocluster/azure-mgmt-mongocluster/tests/test_mongo_cluster_mgmt_mongo_clusters_operations_test.py +++ b/sdk/mongocluster/azure-mgmt-mongocluster/tests/test_mongo_cluster_mgmt_mongo_clusters_operations_test.py @@ -26,4 +26,3 @@ def test_mongo_clusters_list_by_resource_group(self, resource_group): ) result = [r for r in response] assert result == [] - \ No newline at end of file diff --git a/sdk/mongocluster/azure-mgmt-mongocluster/tests/test_mongo_cluster_mgmt_operations_async_test.py b/sdk/mongocluster/azure-mgmt-mongocluster/tests/test_mongo_cluster_mgmt_operations_async_test.py index 983f2b35658d..b3f84df306ce 100644 --- a/sdk/mongocluster/azure-mgmt-mongocluster/tests/test_mongo_cluster_mgmt_operations_async_test.py +++ b/sdk/mongocluster/azure-mgmt-mongocluster/tests/test_mongo_cluster_mgmt_operations_async_test.py @@ -25,4 +25,3 @@ async def test_operations_list(self, resource_group): response = self.client.operations.list() result = [r async for r in response] assert result - diff --git a/sdk/mongocluster/azure-mgmt-mongocluster/tests/test_mongo_cluster_mgmt_operations_test.py b/sdk/mongocluster/azure-mgmt-mongocluster/tests/test_mongo_cluster_mgmt_operations_test.py index d18d4230cec4..07be16fffa7d 100644 --- a/sdk/mongocluster/azure-mgmt-mongocluster/tests/test_mongo_cluster_mgmt_operations_test.py +++ b/sdk/mongocluster/azure-mgmt-mongocluster/tests/test_mongo_cluster_mgmt_operations_test.py @@ -24,4 +24,3 @@ def test_operations_list(self, resource_group): response = self.client.operations.list() result = [r for r in response] assert result - diff --git a/sdk/mongocluster/azure-mgmt-mongocluster/tsp-location.yaml b/sdk/mongocluster/azure-mgmt-mongocluster/tsp-location.yaml index 520e0bf76147..13cd4360ebd3 100644 --- a/sdk/mongocluster/azure-mgmt-mongocluster/tsp-location.yaml +++ b/sdk/mongocluster/azure-mgmt-mongocluster/tsp-location.yaml @@ -1,4 +1,4 @@ directory: specification/mongocluster/DocumentDB.MongoCluster.Management -commit: 465d34792335e02d9bf8de153734420d769adac1 +commit: f93850874010501f216ceadf19459402efd16d9e repo: Azure/azure-rest-api-specs additionalDirectories: