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

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions scaleway-async/scaleway_async/searchdb/v1alpha1/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
from .types import DeleteDeploymentRequest
from .types import DeleteEndpointRequest
from .types import DeleteUserRequest
from .types import GetDeploymentCertificateAuthorityRequest
from .types import GetDeploymentRequest
from .types import ListDeploymentsRequest
from .types import ListDeploymentsResponse
Expand Down Expand Up @@ -69,6 +70,7 @@
"DeleteDeploymentRequest",
"DeleteEndpointRequest",
"DeleteUserRequest",
"GetDeploymentCertificateAuthorityRequest",
"GetDeploymentRequest",
"ListDeploymentsRequest",
"ListDeploymentsResponse",
Expand Down
34 changes: 34 additions & 0 deletions scaleway-async/scaleway_async/searchdb/v1alpha1/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
from scaleway_core.api import API
from scaleway_core.bridge import (
Region as ScwRegion,
ScwFile,
unmarshal_ScwFile,
)
from scaleway_core.utils import (
WaitForOptions,
Expand Down Expand Up @@ -876,3 +878,35 @@ async def delete_user(
)

self._throw_on_error(res)

async def get_deployment_certificate_authority(
self,
*,
deployment_id: str,
region: Optional[ScwRegion] = None,
) -> ScwFile:
"""
:param deployment_id:
:param region: Region to target. If none is passed will use default region from the config.
:return: :class:`ScwFile <ScwFile>`

Usage:
::

result = await api.get_deployment_certificate_authority(
deployment_id="example",
)
"""

param_region = validate_path_param(
"region", region or self.client.default_region
)
param_deployment_id = validate_path_param("deployment_id", deployment_id)

res = self._request(
"GET",
f"/searchdb/v1alpha1/regions/{param_region}/deployments/{param_deployment_id}/certificate-authority",
)

self._throw_on_error(res)
return unmarshal_ScwFile(res.json())
9 changes: 9 additions & 0 deletions scaleway-async/scaleway_async/searchdb/v1alpha1/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -504,6 +504,15 @@ class DeleteUserRequest:
"""


@dataclass
class GetDeploymentCertificateAuthorityRequest:
deployment_id: str
region: Optional[ScwRegion] = None
"""
Region to target. If none is passed will use default region from the config.
"""


@dataclass
class GetDeploymentRequest:
"""
Expand Down
2 changes: 2 additions & 0 deletions scaleway/scaleway/searchdb/v1alpha1/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
from .types import DeleteDeploymentRequest
from .types import DeleteEndpointRequest
from .types import DeleteUserRequest
from .types import GetDeploymentCertificateAuthorityRequest
from .types import GetDeploymentRequest
from .types import ListDeploymentsRequest
from .types import ListDeploymentsResponse
Expand Down Expand Up @@ -69,6 +70,7 @@
"DeleteDeploymentRequest",
"DeleteEndpointRequest",
"DeleteUserRequest",
"GetDeploymentCertificateAuthorityRequest",
"GetDeploymentRequest",
"ListDeploymentsRequest",
"ListDeploymentsResponse",
Expand Down
34 changes: 34 additions & 0 deletions scaleway/scaleway/searchdb/v1alpha1/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
from scaleway_core.api import API
from scaleway_core.bridge import (
Region as ScwRegion,
ScwFile,
unmarshal_ScwFile,
)
from scaleway_core.utils import (
WaitForOptions,
Expand Down Expand Up @@ -874,3 +876,35 @@ def delete_user(
)

self._throw_on_error(res)

def get_deployment_certificate_authority(
self,
*,
deployment_id: str,
region: Optional[ScwRegion] = None,
) -> ScwFile:
"""
:param deployment_id:
:param region: Region to target. If none is passed will use default region from the config.
:return: :class:`ScwFile <ScwFile>`

Usage:
::

result = api.get_deployment_certificate_authority(
deployment_id="example",
)
"""

param_region = validate_path_param(
"region", region or self.client.default_region
)
param_deployment_id = validate_path_param("deployment_id", deployment_id)

res = self._request(
"GET",
f"/searchdb/v1alpha1/regions/{param_region}/deployments/{param_deployment_id}/certificate-authority",
)

self._throw_on_error(res)
return unmarshal_ScwFile(res.json())
9 changes: 9 additions & 0 deletions scaleway/scaleway/searchdb/v1alpha1/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -504,6 +504,15 @@ class DeleteUserRequest:
"""


@dataclass
class GetDeploymentCertificateAuthorityRequest:
deployment_id: str
region: Optional[ScwRegion] = None
"""
Region to target. If none is passed will use default region from the config.
"""


@dataclass
class GetDeploymentRequest:
"""
Expand Down
Loading