|
33 | 33 | Route, |
34 | 34 | SetAclRequest, |
35 | 35 | SetAclResponse, |
36 | | - SetSubnetsRequest, |
37 | | - SetSubnetsResponse, |
38 | 36 | Subnet, |
39 | 37 | UpdatePrivateNetworkRequest, |
40 | 38 | UpdateRouteRequest, |
|
52 | 50 | unmarshal_ListSubnetsResponse, |
53 | 51 | unmarshal_ListVPCsResponse, |
54 | 52 | unmarshal_SetAclResponse, |
55 | | - unmarshal_SetSubnetsResponse, |
56 | 53 | marshal_AddSubnetsRequest, |
57 | 54 | marshal_CreatePrivateNetworkRequest, |
58 | 55 | marshal_CreateRouteRequest, |
59 | 56 | marshal_CreateVPCRequest, |
60 | 57 | marshal_DeleteSubnetsRequest, |
61 | 58 | marshal_SetAclRequest, |
62 | | - marshal_SetSubnetsRequest, |
63 | 59 | marshal_UpdatePrivateNetworkRequest, |
64 | 60 | marshal_UpdateRouteRequest, |
65 | 61 | marshal_UpdateVPCRequest, |
@@ -804,52 +800,6 @@ async def list_subnets_all( |
804 | 800 | }, |
805 | 801 | ) |
806 | 802 |
|
807 | | - async def set_subnets( |
808 | | - self, |
809 | | - *, |
810 | | - private_network_id: str, |
811 | | - region: Optional[ScwRegion] = None, |
812 | | - subnets: Optional[List[str]] = None, |
813 | | - ) -> SetSubnetsResponse: |
814 | | - """ |
815 | | - Set a Private Network's subnets. |
816 | | - Set subnets for an existing Private Network. Note that the method is PUT and not PATCH. Any existing subnets will be removed in favor of the new specified set of subnets. |
817 | | - :param private_network_id: Private Network ID. |
818 | | - :param region: Region to target. If none is passed will use default region from the config. |
819 | | - :param subnets: Private Network subnets CIDR. |
820 | | - :return: :class:`SetSubnetsResponse <SetSubnetsResponse>` |
821 | | -
|
822 | | - Usage: |
823 | | - :: |
824 | | -
|
825 | | - result = await api.set_subnets( |
826 | | - private_network_id="example", |
827 | | - ) |
828 | | - """ |
829 | | - |
830 | | - param_region = validate_path_param( |
831 | | - "region", region or self.client.default_region |
832 | | - ) |
833 | | - param_private_network_id = validate_path_param( |
834 | | - "private_network_id", private_network_id |
835 | | - ) |
836 | | - |
837 | | - res = self._request( |
838 | | - "PUT", |
839 | | - f"/vpc/v2/regions/{param_region}/private-networks/{param_private_network_id}/subnets", |
840 | | - body=marshal_SetSubnetsRequest( |
841 | | - SetSubnetsRequest( |
842 | | - private_network_id=private_network_id, |
843 | | - region=region, |
844 | | - subnets=subnets, |
845 | | - ), |
846 | | - self.client, |
847 | | - ), |
848 | | - ) |
849 | | - |
850 | | - self._throw_on_error(res) |
851 | | - return unmarshal_SetSubnetsResponse(res.json()) |
852 | | - |
853 | 803 | async def add_subnets( |
854 | 804 | self, |
855 | 805 | *, |
|
0 commit comments