Skip to content

Commit cf0f122

Browse files
authored
feat(secret_manager): add secret type messages to simplify deserialization (#486)
1 parent cd40693 commit cf0f122

File tree

4 files changed

+120
-0
lines changed

4 files changed

+120
-0
lines changed

scaleway-async/scaleway_async/secret/v1beta1/__init__.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@
3434
from .types import ListTagsRequest
3535
from .types import ListTagsResponse
3636
from .types import ProtectSecretRequest
37+
from .types import SecretTypeBasicCredentials
38+
from .types import SecretTypeDatabaseCredentials
39+
from .types import SecretTypeSSHKey
3740
from .types import UnprotectSecretRequest
3841
from .types import UpdateSecretRequest
3942
from .types import UpdateSecretVersionRequest
@@ -74,6 +77,9 @@
7477
"ListTagsRequest",
7578
"ListTagsResponse",
7679
"ProtectSecretRequest",
80+
"SecretTypeBasicCredentials",
81+
"SecretTypeDatabaseCredentials",
82+
"SecretTypeSSHKey",
7783
"UnprotectSecretRequest",
7884
"UpdateSecretRequest",
7985
"UpdateSecretVersionRequest",

scaleway-async/scaleway_async/secret/v1beta1/types.py

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -725,6 +725,60 @@ class ProtectSecretRequest:
725725
"""
726726

727727

728+
@dataclass
729+
class SecretTypeBasicCredentials:
730+
username: str
731+
"""
732+
The username or identifier associated with the credentials.
733+
"""
734+
735+
password: str
736+
"""
737+
The password associated with the credentials.
738+
"""
739+
740+
741+
@dataclass
742+
class SecretTypeDatabaseCredentials:
743+
engine: str
744+
"""
745+
Supported database engines are: 'postgres', 'mysql', 'other'.
746+
"""
747+
748+
username: str
749+
"""
750+
The username used to authenticate to the database server.
751+
"""
752+
753+
password: str
754+
"""
755+
The password used to authenticate to the database server.
756+
"""
757+
758+
host: str
759+
"""
760+
The hostname or resolvable DNS name of the database server.
761+
"""
762+
763+
dbname: str
764+
"""
765+
The name of the database to connect to.
766+
"""
767+
768+
port: str
769+
"""
770+
The port must be an integer ranging from 0 to 65535.
771+
"""
772+
773+
774+
@dataclass
775+
class SecretTypeSSHKey:
776+
ssh_private_key: str
777+
"""
778+
The private SSH key.
779+
"""
780+
781+
728782
@dataclass
729783
class UnprotectSecretRequest:
730784
secret_id: str

scaleway/scaleway/secret/v1beta1/__init__.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@
3434
from .types import ListTagsRequest
3535
from .types import ListTagsResponse
3636
from .types import ProtectSecretRequest
37+
from .types import SecretTypeBasicCredentials
38+
from .types import SecretTypeDatabaseCredentials
39+
from .types import SecretTypeSSHKey
3740
from .types import UnprotectSecretRequest
3841
from .types import UpdateSecretRequest
3942
from .types import UpdateSecretVersionRequest
@@ -74,6 +77,9 @@
7477
"ListTagsRequest",
7578
"ListTagsResponse",
7679
"ProtectSecretRequest",
80+
"SecretTypeBasicCredentials",
81+
"SecretTypeDatabaseCredentials",
82+
"SecretTypeSSHKey",
7783
"UnprotectSecretRequest",
7884
"UpdateSecretRequest",
7985
"UpdateSecretVersionRequest",

scaleway/scaleway/secret/v1beta1/types.py

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -725,6 +725,60 @@ class ProtectSecretRequest:
725725
"""
726726

727727

728+
@dataclass
729+
class SecretTypeBasicCredentials:
730+
username: str
731+
"""
732+
The username or identifier associated with the credentials.
733+
"""
734+
735+
password: str
736+
"""
737+
The password associated with the credentials.
738+
"""
739+
740+
741+
@dataclass
742+
class SecretTypeDatabaseCredentials:
743+
engine: str
744+
"""
745+
Supported database engines are: 'postgres', 'mysql', 'other'.
746+
"""
747+
748+
username: str
749+
"""
750+
The username used to authenticate to the database server.
751+
"""
752+
753+
password: str
754+
"""
755+
The password used to authenticate to the database server.
756+
"""
757+
758+
host: str
759+
"""
760+
The hostname or resolvable DNS name of the database server.
761+
"""
762+
763+
dbname: str
764+
"""
765+
The name of the database to connect to.
766+
"""
767+
768+
port: str
769+
"""
770+
The port must be an integer ranging from 0 to 65535.
771+
"""
772+
773+
774+
@dataclass
775+
class SecretTypeSSHKey:
776+
ssh_private_key: str
777+
"""
778+
The private SSH key.
779+
"""
780+
781+
728782
@dataclass
729783
class UnprotectSecretRequest:
730784
secret_id: str

0 commit comments

Comments
 (0)