Skip to content

Commit 4dcaf05

Browse files
authored
code and test (#41858)
Co-authored-by: azure-sdk <PythonSdkPipelines>
1 parent d558e89 commit 4dcaf05

File tree

10 files changed

+109
-67
lines changed

10 files changed

+109
-67
lines changed

sdk/mongodbatlas/azure-mgmt-mongodbatlas/CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# Release History
22

3+
## 1.0.0 (2025-07-02)
4+
5+
### Features Added
6+
7+
- Added model `OrganizationResourceUpdate`
8+
- Added model `OrganizationResourceUpdateProperties`
9+
310
## 1.0.0b1 (2025-05-15)
411

512
### Other Changes
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"apiVersion": "2025-06-01",
3-
"commit": "b56458e7a80d3f92fa834039e6d20a1a1e1fec1b",
3+
"commit": "fa6fa40e4b84fded374f3aff1e591fa217a82fe8",
44
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
55
"typespec_src": "specification/liftrmongodb/MongoDB.Atlas.Management",
6-
"emitterVersion": "0.45.1"
6+
"emitterVersion": "0.45.5"
77
}

sdk/mongodbatlas/azure-mgmt-mongodbatlas/apiview-properties.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
"azure.mgmt.mongodbatlas.models.Resource": "Azure.ResourceManager.CommonTypes.Resource",
1414
"azure.mgmt.mongodbatlas.models.TrackedResource": "Azure.ResourceManager.CommonTypes.TrackedResource",
1515
"azure.mgmt.mongodbatlas.models.OrganizationResource": "MongoDB.Atlas.OrganizationResource",
16+
"azure.mgmt.mongodbatlas.models.OrganizationResourceUpdate": "Azure.ResourceManager.Foundations.ResourceUpdateModel",
17+
"azure.mgmt.mongodbatlas.models.OrganizationResourceUpdateProperties": "Azure.ResourceManager.Foundations.ResourceUpdateModelProperties",
1618
"azure.mgmt.mongodbatlas.models.PartnerProperties": "MongoDB.Atlas.PartnerProperties",
1719
"azure.mgmt.mongodbatlas.models.SystemData": "Azure.ResourceManager.CommonTypes.SystemData",
1820
"azure.mgmt.mongodbatlas.models.UserAssignedIdentity": "Azure.ResourceManager.CommonTypes.UserAssignedIdentity",

sdk/mongodbatlas/azure-mgmt-mongodbatlas/azure/mgmt/mongodbatlas/aio/operations/_operations.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -478,7 +478,7 @@ async def _update_initial(
478478
self,
479479
resource_group_name: str,
480480
organization_name: str,
481-
properties: Union[_models.OrganizationResource, JSON, IO[bytes]],
481+
properties: Union[_models.OrganizationResourceUpdate, JSON, IO[bytes]],
482482
**kwargs: Any
483483
) -> AsyncIterator[bytes]:
484484
error_map: MutableMapping = {
@@ -550,7 +550,7 @@ async def begin_update(
550550
self,
551551
resource_group_name: str,
552552
organization_name: str,
553-
properties: _models.OrganizationResource,
553+
properties: _models.OrganizationResourceUpdate,
554554
*,
555555
content_type: str = "application/json",
556556
**kwargs: Any
@@ -563,7 +563,7 @@ async def begin_update(
563563
:param organization_name: Name of the Organization resource. Required.
564564
:type organization_name: str
565565
:param properties: The resource properties to be updated. Required.
566-
:type properties: ~azure.mgmt.mongodbatlas.models.OrganizationResource
566+
:type properties: ~azure.mgmt.mongodbatlas.models.OrganizationResourceUpdate
567567
:keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
568568
Default value is "application/json".
569569
:paramtype content_type: str
@@ -637,7 +637,7 @@ async def begin_update(
637637
self,
638638
resource_group_name: str,
639639
organization_name: str,
640-
properties: Union[_models.OrganizationResource, JSON, IO[bytes]],
640+
properties: Union[_models.OrganizationResourceUpdate, JSON, IO[bytes]],
641641
**kwargs: Any
642642
) -> AsyncLROPoller[_models.OrganizationResource]:
643643
"""Update a OrganizationResource.
@@ -648,8 +648,9 @@ async def begin_update(
648648
:param organization_name: Name of the Organization resource. Required.
649649
:type organization_name: str
650650
:param properties: The resource properties to be updated. Is one of the following types:
651-
OrganizationResource, JSON, IO[bytes] Required.
652-
:type properties: ~azure.mgmt.mongodbatlas.models.OrganizationResource or JSON or IO[bytes]
651+
OrganizationResourceUpdate, JSON, IO[bytes] Required.
652+
:type properties: ~azure.mgmt.mongodbatlas.models.OrganizationResourceUpdate or JSON or
653+
IO[bytes]
653654
:return: An instance of AsyncLROPoller that returns OrganizationResource. The
654655
OrganizationResource is compatible with MutableMapping
655656
:rtype:

sdk/mongodbatlas/azure-mgmt-mongodbatlas/azure/mgmt/mongodbatlas/models/__init__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@
2424
OperationDisplay,
2525
OrganizationProperties,
2626
OrganizationResource,
27+
OrganizationResourceUpdate,
28+
OrganizationResourceUpdateProperties,
2729
PartnerProperties,
2830
Resource,
2931
SystemData,
@@ -55,6 +57,8 @@
5557
"OperationDisplay",
5658
"OrganizationProperties",
5759
"OrganizationResource",
60+
"OrganizationResourceUpdate",
61+
"OrganizationResourceUpdateProperties",
5862
"PartnerProperties",
5963
"Resource",
6064
"SystemData",

sdk/mongodbatlas/azure-mgmt-mongodbatlas/azure/mgmt/mongodbatlas/models/_models.py

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -501,6 +501,83 @@ def __init__(self, *args: Any, **kwargs: Any) -> None:
501501
super().__init__(*args, **kwargs)
502502

503503

504+
class OrganizationResourceUpdate(_Model):
505+
"""The type used for update operations of the OrganizationResource.
506+
507+
:ivar identity: The managed service identities assigned to this resource.
508+
:vartype identity: ~azure.mgmt.mongodbatlas.models.ManagedServiceIdentity
509+
:ivar tags: Resource tags.
510+
:vartype tags: dict[str, str]
511+
:ivar properties: The resource-specific properties for this resource.
512+
:vartype properties: ~azure.mgmt.mongodbatlas.models.OrganizationResourceUpdateProperties
513+
"""
514+
515+
identity: Optional["_models.ManagedServiceIdentity"] = rest_field(
516+
visibility=["read", "create", "update", "delete", "query"]
517+
)
518+
"""The managed service identities assigned to this resource."""
519+
tags: Optional[Dict[str, str]] = rest_field(visibility=["read", "create", "update", "delete", "query"])
520+
"""Resource tags."""
521+
properties: Optional["_models.OrganizationResourceUpdateProperties"] = rest_field(
522+
visibility=["read", "create", "update", "delete", "query"]
523+
)
524+
"""The resource-specific properties for this resource."""
525+
526+
@overload
527+
def __init__(
528+
self,
529+
*,
530+
identity: Optional["_models.ManagedServiceIdentity"] = None,
531+
tags: Optional[Dict[str, str]] = None,
532+
properties: Optional["_models.OrganizationResourceUpdateProperties"] = None,
533+
) -> None: ...
534+
535+
@overload
536+
def __init__(self, mapping: Mapping[str, Any]) -> None:
537+
"""
538+
:param mapping: raw JSON to initialize the model.
539+
:type mapping: Mapping[str, Any]
540+
"""
541+
542+
def __init__(self, *args: Any, **kwargs: Any) -> None:
543+
super().__init__(*args, **kwargs)
544+
545+
546+
class OrganizationResourceUpdateProperties(_Model):
547+
"""The updatable properties of the OrganizationResource.
548+
549+
:ivar user: Details of the user.
550+
:vartype user: ~azure.mgmt.mongodbatlas.models.UserDetails
551+
:ivar partner_properties: MongoDB properties.
552+
:vartype partner_properties: ~azure.mgmt.mongodbatlas.models.PartnerProperties
553+
"""
554+
555+
user: Optional["_models.UserDetails"] = rest_field(visibility=["read", "create", "update", "delete", "query"])
556+
"""Details of the user."""
557+
partner_properties: Optional["_models.PartnerProperties"] = rest_field(
558+
name="partnerProperties", visibility=["read", "create", "update", "delete", "query"]
559+
)
560+
"""MongoDB properties."""
561+
562+
@overload
563+
def __init__(
564+
self,
565+
*,
566+
user: Optional["_models.UserDetails"] = None,
567+
partner_properties: Optional["_models.PartnerProperties"] = None,
568+
) -> None: ...
569+
570+
@overload
571+
def __init__(self, mapping: Mapping[str, Any]) -> None:
572+
"""
573+
:param mapping: raw JSON to initialize the model.
574+
:type mapping: Mapping[str, Any]
575+
"""
576+
577+
def __init__(self, *args: Any, **kwargs: Any) -> None:
578+
super().__init__(*args, **kwargs)
579+
580+
504581
class PartnerProperties(_Model):
505582
"""MongoDB specific Properties.
506583

sdk/mongodbatlas/azure-mgmt-mongodbatlas/azure/mgmt/mongodbatlas/operations/_operations.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -655,7 +655,7 @@ def _update_initial(
655655
self,
656656
resource_group_name: str,
657657
organization_name: str,
658-
properties: Union[_models.OrganizationResource, JSON, IO[bytes]],
658+
properties: Union[_models.OrganizationResourceUpdate, JSON, IO[bytes]],
659659
**kwargs: Any
660660
) -> Iterator[bytes]:
661661
error_map: MutableMapping = {
@@ -727,7 +727,7 @@ def begin_update(
727727
self,
728728
resource_group_name: str,
729729
organization_name: str,
730-
properties: _models.OrganizationResource,
730+
properties: _models.OrganizationResourceUpdate,
731731
*,
732732
content_type: str = "application/json",
733733
**kwargs: Any
@@ -740,7 +740,7 @@ def begin_update(
740740
:param organization_name: Name of the Organization resource. Required.
741741
:type organization_name: str
742742
:param properties: The resource properties to be updated. Required.
743-
:type properties: ~azure.mgmt.mongodbatlas.models.OrganizationResource
743+
:type properties: ~azure.mgmt.mongodbatlas.models.OrganizationResourceUpdate
744744
:keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
745745
Default value is "application/json".
746746
:paramtype content_type: str
@@ -811,7 +811,7 @@ def begin_update(
811811
self,
812812
resource_group_name: str,
813813
organization_name: str,
814-
properties: Union[_models.OrganizationResource, JSON, IO[bytes]],
814+
properties: Union[_models.OrganizationResourceUpdate, JSON, IO[bytes]],
815815
**kwargs: Any
816816
) -> LROPoller[_models.OrganizationResource]:
817817
"""Update a OrganizationResource.
@@ -822,8 +822,9 @@ def begin_update(
822822
:param organization_name: Name of the Organization resource. Required.
823823
:type organization_name: str
824824
:param properties: The resource properties to be updated. Is one of the following types:
825-
OrganizationResource, JSON, IO[bytes] Required.
826-
:type properties: ~azure.mgmt.mongodbatlas.models.OrganizationResource or JSON or IO[bytes]
825+
OrganizationResourceUpdate, JSON, IO[bytes] Required.
826+
:type properties: ~azure.mgmt.mongodbatlas.models.OrganizationResourceUpdate or JSON or
827+
IO[bytes]
827828
:return: An instance of LROPoller that returns OrganizationResource. The OrganizationResource
828829
is compatible with MutableMapping
829830
:rtype: ~azure.core.polling.LROPoller[~azure.mgmt.mongodbatlas.models.OrganizationResource]

sdk/mongodbatlas/azure-mgmt-mongodbatlas/generated_tests/test_mongo_db_atlas_mgmt_organizations_operations.py

Lines changed: 1 addition & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -92,28 +92,14 @@ def test_organizations_begin_update(self, resource_group):
9292
resource_group_name=resource_group.name,
9393
organization_name="str",
9494
properties={
95-
"location": "str",
96-
"id": "str",
9795
"identity": {
9896
"type": "str",
9997
"principalId": "str",
10098
"tenantId": "str",
10199
"userAssignedIdentities": {"str": {"clientId": "str", "principalId": "str"}},
102100
},
103-
"name": "str",
104101
"properties": {
105-
"marketplace": {
106-
"offerDetails": {
107-
"offerId": "str",
108-
"planId": "str",
109-
"publisherId": "str",
110-
"planName": "str",
111-
"termId": "str",
112-
"termUnit": "str",
113-
},
114-
"subscriptionId": "str",
115-
"subscriptionStatus": "str",
116-
},
102+
"partnerProperties": {"organizationName": "str", "organizationId": "str", "redirectUrl": "str"},
117103
"user": {
118104
"emailAddress": "str",
119105
"firstName": "str",
@@ -122,19 +108,8 @@ def test_organizations_begin_update(self, resource_group):
122108
"phoneNumber": "str",
123109
"upn": "str",
124110
},
125-
"partnerProperties": {"organizationName": "str", "organizationId": "str", "redirectUrl": "str"},
126-
"provisioningState": "str",
127-
},
128-
"systemData": {
129-
"createdAt": "2020-02-20 00:00:00",
130-
"createdBy": "str",
131-
"createdByType": "str",
132-
"lastModifiedAt": "2020-02-20 00:00:00",
133-
"lastModifiedBy": "str",
134-
"lastModifiedByType": "str",
135111
},
136112
"tags": {"str": "str"},
137-
"type": "str",
138113
},
139114
).result() # call '.result()' to poll until service return final result
140115

sdk/mongodbatlas/azure-mgmt-mongodbatlas/generated_tests/test_mongo_db_atlas_mgmt_organizations_operations_async.py

Lines changed: 1 addition & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -96,28 +96,14 @@ async def test_organizations_begin_update(self, resource_group):
9696
resource_group_name=resource_group.name,
9797
organization_name="str",
9898
properties={
99-
"location": "str",
100-
"id": "str",
10199
"identity": {
102100
"type": "str",
103101
"principalId": "str",
104102
"tenantId": "str",
105103
"userAssignedIdentities": {"str": {"clientId": "str", "principalId": "str"}},
106104
},
107-
"name": "str",
108105
"properties": {
109-
"marketplace": {
110-
"offerDetails": {
111-
"offerId": "str",
112-
"planId": "str",
113-
"publisherId": "str",
114-
"planName": "str",
115-
"termId": "str",
116-
"termUnit": "str",
117-
},
118-
"subscriptionId": "str",
119-
"subscriptionStatus": "str",
120-
},
106+
"partnerProperties": {"organizationName": "str", "organizationId": "str", "redirectUrl": "str"},
121107
"user": {
122108
"emailAddress": "str",
123109
"firstName": "str",
@@ -126,19 +112,8 @@ async def test_organizations_begin_update(self, resource_group):
126112
"phoneNumber": "str",
127113
"upn": "str",
128114
},
129-
"partnerProperties": {"organizationName": "str", "organizationId": "str", "redirectUrl": "str"},
130-
"provisioningState": "str",
131-
},
132-
"systemData": {
133-
"createdAt": "2020-02-20 00:00:00",
134-
"createdBy": "str",
135-
"createdByType": "str",
136-
"lastModifiedAt": "2020-02-20 00:00:00",
137-
"lastModifiedBy": "str",
138-
"lastModifiedByType": "str",
139115
},
140116
"tags": {"str": "str"},
141-
"type": "str",
142117
},
143118
)
144119
).result() # call '.result()' to poll until service return final result
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
directory: specification/liftrmongodb/MongoDB.Atlas.Management
2-
commit: b56458e7a80d3f92fa834039e6d20a1a1e1fec1b
2+
commit: fa6fa40e4b84fded374f3aff1e591fa217a82fe8
33
repo: Azure/azure-rest-api-specs
44
additionalDirectories:

0 commit comments

Comments
 (0)