File tree Expand file tree Collapse file tree 6 files changed +90
-0
lines changed
scaleway-async/scaleway_async/searchdb/v1alpha1
scaleway/scaleway/searchdb/v1alpha1 Expand file tree Collapse file tree 6 files changed +90
-0
lines changed Original file line number Diff line number Diff line change 2727from .types import DeleteDeploymentRequest
2828from .types import DeleteEndpointRequest
2929from .types import DeleteUserRequest
30+ from .types import GetDeploymentCertificateAuthorityRequest
3031from .types import GetDeploymentRequest
3132from .types import ListDeploymentsRequest
3233from .types import ListDeploymentsResponse
6970 "DeleteDeploymentRequest" ,
7071 "DeleteEndpointRequest" ,
7172 "DeleteUserRequest" ,
73+ "GetDeploymentCertificateAuthorityRequest" ,
7274 "GetDeploymentRequest" ,
7375 "ListDeploymentsRequest" ,
7476 "ListDeploymentsResponse" ,
Original file line number Diff line number Diff line change 66from scaleway_core .api import API
77from scaleway_core .bridge import (
88 Region as ScwRegion ,
9+ ScwFile ,
10+ unmarshal_ScwFile ,
911)
1012from scaleway_core .utils import (
1113 WaitForOptions ,
@@ -876,3 +878,35 @@ async def delete_user(
876878 )
877879
878880 self ._throw_on_error (res )
881+
882+ async def get_deployment_certificate_authority (
883+ self ,
884+ * ,
885+ deployment_id : str ,
886+ region : Optional [ScwRegion ] = None ,
887+ ) -> ScwFile :
888+ """
889+ :param deployment_id:
890+ :param region: Region to target. If none is passed will use default region from the config.
891+ :return: :class:`ScwFile <ScwFile>`
892+
893+ Usage:
894+ ::
895+
896+ result = await api.get_deployment_certificate_authority(
897+ deployment_id="example",
898+ )
899+ """
900+
901+ param_region = validate_path_param (
902+ "region" , region or self .client .default_region
903+ )
904+ param_deployment_id = validate_path_param ("deployment_id" , deployment_id )
905+
906+ res = self ._request (
907+ "GET" ,
908+ f"/searchdb/v1alpha1/regions/{ param_region } /deployments/{ param_deployment_id } /certificate-authority" ,
909+ )
910+
911+ self ._throw_on_error (res )
912+ return unmarshal_ScwFile (res .json ())
Original file line number Diff line number Diff line change @@ -504,6 +504,15 @@ class DeleteUserRequest:
504504 """
505505
506506
507+ @dataclass
508+ class GetDeploymentCertificateAuthorityRequest :
509+ deployment_id : str
510+ region : Optional [ScwRegion ] = None
511+ """
512+ Region to target. If none is passed will use default region from the config.
513+ """
514+
515+
507516@dataclass
508517class GetDeploymentRequest :
509518 """
Original file line number Diff line number Diff line change 2727from .types import DeleteDeploymentRequest
2828from .types import DeleteEndpointRequest
2929from .types import DeleteUserRequest
30+ from .types import GetDeploymentCertificateAuthorityRequest
3031from .types import GetDeploymentRequest
3132from .types import ListDeploymentsRequest
3233from .types import ListDeploymentsResponse
6970 "DeleteDeploymentRequest" ,
7071 "DeleteEndpointRequest" ,
7172 "DeleteUserRequest" ,
73+ "GetDeploymentCertificateAuthorityRequest" ,
7274 "GetDeploymentRequest" ,
7375 "ListDeploymentsRequest" ,
7476 "ListDeploymentsResponse" ,
Original file line number Diff line number Diff line change 66from scaleway_core .api import API
77from scaleway_core .bridge import (
88 Region as ScwRegion ,
9+ ScwFile ,
10+ unmarshal_ScwFile ,
911)
1012from scaleway_core .utils import (
1113 WaitForOptions ,
@@ -874,3 +876,35 @@ def delete_user(
874876 )
875877
876878 self ._throw_on_error (res )
879+
880+ def get_deployment_certificate_authority (
881+ self ,
882+ * ,
883+ deployment_id : str ,
884+ region : Optional [ScwRegion ] = None ,
885+ ) -> ScwFile :
886+ """
887+ :param deployment_id:
888+ :param region: Region to target. If none is passed will use default region from the config.
889+ :return: :class:`ScwFile <ScwFile>`
890+
891+ Usage:
892+ ::
893+
894+ result = api.get_deployment_certificate_authority(
895+ deployment_id="example",
896+ )
897+ """
898+
899+ param_region = validate_path_param (
900+ "region" , region or self .client .default_region
901+ )
902+ param_deployment_id = validate_path_param ("deployment_id" , deployment_id )
903+
904+ res = self ._request (
905+ "GET" ,
906+ f"/searchdb/v1alpha1/regions/{ param_region } /deployments/{ param_deployment_id } /certificate-authority" ,
907+ )
908+
909+ self ._throw_on_error (res )
910+ return unmarshal_ScwFile (res .json ())
Original file line number Diff line number Diff line change @@ -504,6 +504,15 @@ class DeleteUserRequest:
504504 """
505505
506506
507+ @dataclass
508+ class GetDeploymentCertificateAuthorityRequest :
509+ deployment_id : str
510+ region : Optional [ScwRegion ] = None
511+ """
512+ Region to target. If none is passed will use default region from the config.
513+ """
514+
515+
507516@dataclass
508517class GetDeploymentRequest :
509518 """
You can’t perform that action at this time.
0 commit comments