Skip to content

feat(secret_manager): return type on AccessSecretVersion #480

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 4, 2024
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: 1 addition & 1 deletion scaleway-async/scaleway_async/secret/v1beta1/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ async def create_secret(
:param project_id: ID of the Project containing the secret.
:param tags: List of the secret's tags.
:param description: Description of the secret.
:param type_: (Optional.) See `Secret.Type` enum for description of values. If not specified, the type is `Opaque`.
:param type_: (Optional.) See the `Secret.Type` enum for a description of values. If not specified, the type is `Opaque`.
:param path: (Optional.) Location of the secret in the directory structure. If not specified, the path is `/`.
:param ephemeral_policy: (Optional.) Policy that defines whether/when a secret's versions expire. By default, the policy is applied to all the secret's versions.
:return: :class:`Secret <Secret>`
Expand Down
4 changes: 4 additions & 0 deletions scaleway-async/scaleway_async/secret/v1beta1/marshalling.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,10 @@ def unmarshal_AccessSecretVersionResponse(data: Any) -> AccessSecretVersionRespo
if field is not None:
args["data"] = field

field = data.get("type_", None)
if field is not None:
args["type_"] = field

field = data.get("data_crc32", None)
if field is not None:
args["data_crc32"] = field
Expand Down
9 changes: 7 additions & 2 deletions scaleway-async/scaleway_async/secret/v1beta1/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ class Secret:

type_: SecretType
"""
See `Secret.Type` enum for description of values.
See the `Secret.Type` enum for a description of values.
"""

path: str
Expand Down Expand Up @@ -318,6 +318,11 @@ class AccessSecretVersionResponse:
The base64-encoded secret payload of the version.
"""

type_: SecretType
"""
See the `Secret.Type` enum for a description of values.
"""

data_crc32: Optional[int]
"""
This field is only available if a CRC32 was supplied during the creation of the version.
Expand Down Expand Up @@ -423,7 +428,7 @@ class CreateSecretRequest:

type_: Optional[SecretType]
"""
(Optional.) See `Secret.Type` enum for description of values. If not specified, the type is `Opaque`.
(Optional.) See the `Secret.Type` enum for a description of values. If not specified, the type is `Opaque`.
"""

path: Optional[str]
Expand Down
2 changes: 1 addition & 1 deletion scaleway/scaleway/secret/v1beta1/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def create_secret(
:param project_id: ID of the Project containing the secret.
:param tags: List of the secret's tags.
:param description: Description of the secret.
:param type_: (Optional.) See `Secret.Type` enum for description of values. If not specified, the type is `Opaque`.
:param type_: (Optional.) See the `Secret.Type` enum for a description of values. If not specified, the type is `Opaque`.
:param path: (Optional.) Location of the secret in the directory structure. If not specified, the path is `/`.
:param ephemeral_policy: (Optional.) Policy that defines whether/when a secret's versions expire. By default, the policy is applied to all the secret's versions.
:return: :class:`Secret <Secret>`
Expand Down
4 changes: 4 additions & 0 deletions scaleway/scaleway/secret/v1beta1/marshalling.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,10 @@ def unmarshal_AccessSecretVersionResponse(data: Any) -> AccessSecretVersionRespo
if field is not None:
args["data"] = field

field = data.get("type_", None)
if field is not None:
args["type_"] = field

field = data.get("data_crc32", None)
if field is not None:
args["data_crc32"] = field
Expand Down
9 changes: 7 additions & 2 deletions scaleway/scaleway/secret/v1beta1/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ class Secret:

type_: SecretType
"""
See `Secret.Type` enum for description of values.
See the `Secret.Type` enum for a description of values.
"""

path: str
Expand Down Expand Up @@ -318,6 +318,11 @@ class AccessSecretVersionResponse:
The base64-encoded secret payload of the version.
"""

type_: SecretType
"""
See the `Secret.Type` enum for a description of values.
"""

data_crc32: Optional[int]
"""
This field is only available if a CRC32 was supplied during the creation of the version.
Expand Down Expand Up @@ -423,7 +428,7 @@ class CreateSecretRequest:

type_: Optional[SecretType]
"""
(Optional.) See `Secret.Type` enum for description of values. If not specified, the type is `Opaque`.
(Optional.) See the `Secret.Type` enum for a description of values. If not specified, the type is `Opaque`.
"""

path: Optional[str]
Expand Down