Skip to content

Commit 3e645c4

Browse files
authored
feat: add missing special secret version revision (#307)
1 parent 6f8a1c8 commit 3e645c4

File tree

4 files changed

+128
-32
lines changed

4 files changed

+128
-32
lines changed

scaleway-async/scaleway_async/secret/v1alpha1/api.py

Lines changed: 32 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -800,7 +800,10 @@ async def get_secret_version(
800800
:param region: Region to target. If none is passed will use default region from the config.
801801
:param secret_id: ID of the secret.
802802
:param revision: Version number.
803-
The first version of the secret is numbered 1, and all subsequent revisions augment by 1. Value can be a number or "latest".
803+
The first version of the secret is numbered 1, and all subsequent revisions augment by 1. Value can be either:
804+
- a number (the revision number)
805+
- "latest" (the latest revision)
806+
- "latest_enabled" (the latest enabled revision).
804807
:return: :class:`SecretVersion <SecretVersion>`
805808
806809
Usage:
@@ -840,7 +843,10 @@ async def get_secret_version_by_name(
840843
:param region: Region to target. If none is passed will use default region from the config.
841844
:param secret_name: Name of the secret.
842845
:param revision: Version number.
843-
The first version of the secret is numbered 1, and all subsequent revisions augment by 1. Value can be a number or "latest".
846+
The first version of the secret is numbered 1, and all subsequent revisions augment by 1. Value can be either:
847+
- a number (the revision number)
848+
- "latest" (the latest revision)
849+
- "latest_enabled" (the latest enabled revision).
844850
:param project_id: ID of the Project to target.
845851
(Optional.) If not specified, Secret Manager will look for the secret version in all Projects.
846852
:return: :class:`SecretVersion <SecretVersion>`
@@ -885,7 +891,10 @@ async def update_secret_version(
885891
:param region: Region to target. If none is passed will use default region from the config.
886892
:param secret_id: ID of the secret.
887893
:param revision: Version number.
888-
The first version of the secret is numbered 1, and all subsequent revisions augment by 1. Value can be a number or "latest".
894+
The first version of the secret is numbered 1, and all subsequent revisions augment by 1. Value can be either:
895+
- a number (the revision number)
896+
- "latest" (the latest revision)
897+
- "latest_enabled" (the latest enabled revision).
889898
:param description: Description of the version.
890899
:return: :class:`SecretVersion <SecretVersion>`
891900
@@ -1104,7 +1113,10 @@ async def enable_secret_version(
11041113
:param region: Region to target. If none is passed will use default region from the config.
11051114
:param secret_id: ID of the secret.
11061115
:param revision: Version number.
1107-
The first version of the secret is numbered 1, and all subsequent revisions augment by 1. Value can be a number or "latest".
1116+
The first version of the secret is numbered 1, and all subsequent revisions augment by 1. Value can be either:
1117+
- a number (the revision number)
1118+
- "latest" (the latest revision)
1119+
- "latest_enabled" (the latest enabled revision).
11081120
:return: :class:`SecretVersion <SecretVersion>`
11091121
11101122
Usage:
@@ -1143,7 +1155,10 @@ async def disable_secret_version(
11431155
:param region: Region to target. If none is passed will use default region from the config.
11441156
:param secret_id: ID of the secret.
11451157
:param revision: Version number.
1146-
The first version of the secret is numbered 1, and all subsequent revisions augment by 1. Value can be a number or "latest".
1158+
The first version of the secret is numbered 1, and all subsequent revisions augment by 1. Value can be either:
1159+
- a number (the revision number)
1160+
- "latest" (the latest revision)
1161+
- "latest_enabled" (the latest enabled revision).
11471162
:return: :class:`SecretVersion <SecretVersion>`
11481163
11491164
Usage:
@@ -1182,7 +1197,10 @@ async def access_secret_version(
11821197
:param region: Region to target. If none is passed will use default region from the config.
11831198
:param secret_id: ID of the secret.
11841199
:param revision: Version number.
1185-
The first version of the secret is numbered 1, and all subsequent revisions augment by 1. Value can be a number or "latest".
1200+
The first version of the secret is numbered 1, and all subsequent revisions augment by 1. Value can be either:
1201+
- a number (the revision number)
1202+
- "latest" (the latest revision)
1203+
- "latest_enabled" (the latest enabled revision).
11861204
:return: :class:`AccessSecretVersionResponse <AccessSecretVersionResponse>`
11871205
11881206
Usage:
@@ -1222,7 +1240,10 @@ async def access_secret_version_by_name(
12221240
:param region: Region to target. If none is passed will use default region from the config.
12231241
:param secret_name: Name of the secret.
12241242
:param revision: Version number.
1225-
The first version of the secret is numbered 1, and all subsequent revisions augment by 1. Value can be a number or "latest".
1243+
The first version of the secret is numbered 1, and all subsequent revisions augment by 1. Value can be either:
1244+
- a number (the revision number)
1245+
- "latest" (the latest revision)
1246+
- "latest_enabled" (the latest enabled revision).
12261247
:param project_id: ID of the Project to target.
12271248
(Optional.) If not specified, Secret Manager will look for the secret version in all Projects.
12281249
:return: :class:`AccessSecretVersionResponse <AccessSecretVersionResponse>`
@@ -1266,7 +1287,10 @@ async def destroy_secret_version(
12661287
:param region: Region to target. If none is passed will use default region from the config.
12671288
:param secret_id: ID of the secret.
12681289
:param revision: Version number.
1269-
The first version of the secret is numbered 1, and all subsequent revisions augment by 1. Value can be a number or "latest".
1290+
The first version of the secret is numbered 1, and all subsequent revisions augment by 1. Value can be either:
1291+
- a number (the revision number)
1292+
- "latest" (the latest revision)
1293+
- "latest_enabled" (the latest enabled revision).
12701294
:return: :class:`SecretVersion <SecretVersion>`
12711295
12721296
Usage:

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

Lines changed: 32 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -744,7 +744,10 @@ class GetSecretVersionRequest:
744744
revision: str
745745
"""
746746
Version number.
747-
The first version of the secret is numbered 1, and all subsequent revisions augment by 1. Value can be a number or "latest".
747+
The first version of the secret is numbered 1, and all subsequent revisions augment by 1. Value can be either:
748+
- a number (the revision number)
749+
- "latest" (the latest revision)
750+
- "latest_enabled" (the latest enabled revision).
748751
"""
749752

750753

@@ -763,7 +766,10 @@ class GetSecretVersionByNameRequest:
763766
revision: str
764767
"""
765768
Version number.
766-
The first version of the secret is numbered 1, and all subsequent revisions augment by 1. Value can be a number or "latest".
769+
The first version of the secret is numbered 1, and all subsequent revisions augment by 1. Value can be either:
770+
- a number (the revision number)
771+
- "latest" (the latest revision)
772+
- "latest_enabled" (the latest enabled revision).
767773
"""
768774

769775
project_id: Optional[str]
@@ -788,7 +794,10 @@ class UpdateSecretVersionRequest:
788794
revision: str
789795
"""
790796
Version number.
791-
The first version of the secret is numbered 1, and all subsequent revisions augment by 1. Value can be a number or "latest".
797+
The first version of the secret is numbered 1, and all subsequent revisions augment by 1. Value can be either:
798+
- a number (the revision number)
799+
- "latest" (the latest revision)
800+
- "latest_enabled" (the latest enabled revision).
792801
"""
793802

794803
description: Optional[str]
@@ -862,7 +871,10 @@ class EnableSecretVersionRequest:
862871
revision: str
863872
"""
864873
Version number.
865-
The first version of the secret is numbered 1, and all subsequent revisions augment by 1. Value can be a number or "latest".
874+
The first version of the secret is numbered 1, and all subsequent revisions augment by 1. Value can be either:
875+
- a number (the revision number)
876+
- "latest" (the latest revision)
877+
- "latest_enabled" (the latest enabled revision).
866878
"""
867879

868880

@@ -881,7 +893,10 @@ class DisableSecretVersionRequest:
881893
revision: str
882894
"""
883895
Version number.
884-
The first version of the secret is numbered 1, and all subsequent revisions augment by 1. Value can be a number or "latest".
896+
The first version of the secret is numbered 1, and all subsequent revisions augment by 1. Value can be either:
897+
- a number (the revision number)
898+
- "latest" (the latest revision)
899+
- "latest_enabled" (the latest enabled revision).
885900
"""
886901

887902

@@ -900,7 +915,10 @@ class AccessSecretVersionRequest:
900915
revision: str
901916
"""
902917
Version number.
903-
The first version of the secret is numbered 1, and all subsequent revisions augment by 1. Value can be a number or "latest".
918+
The first version of the secret is numbered 1, and all subsequent revisions augment by 1. Value can be either:
919+
- a number (the revision number)
920+
- "latest" (the latest revision)
921+
- "latest_enabled" (the latest enabled revision).
904922
"""
905923

906924

@@ -919,7 +937,10 @@ class AccessSecretVersionByNameRequest:
919937
revision: str
920938
"""
921939
Version number.
922-
The first version of the secret is numbered 1, and all subsequent revisions augment by 1. Value can be a number or "latest".
940+
The first version of the secret is numbered 1, and all subsequent revisions augment by 1. Value can be either:
941+
- a number (the revision number)
942+
- "latest" (the latest revision)
943+
- "latest_enabled" (the latest enabled revision).
923944
"""
924945

925946
project_id: Optional[str]
@@ -944,7 +965,10 @@ class DestroySecretVersionRequest:
944965
revision: str
945966
"""
946967
Version number.
947-
The first version of the secret is numbered 1, and all subsequent revisions augment by 1. Value can be a number or "latest".
968+
The first version of the secret is numbered 1, and all subsequent revisions augment by 1. Value can be either:
969+
- a number (the revision number)
970+
- "latest" (the latest revision)
971+
- "latest_enabled" (the latest enabled revision).
948972
"""
949973

950974

scaleway/scaleway/secret/v1alpha1/api.py

Lines changed: 32 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -800,7 +800,10 @@ def get_secret_version(
800800
:param region: Region to target. If none is passed will use default region from the config.
801801
:param secret_id: ID of the secret.
802802
:param revision: Version number.
803-
The first version of the secret is numbered 1, and all subsequent revisions augment by 1. Value can be a number or "latest".
803+
The first version of the secret is numbered 1, and all subsequent revisions augment by 1. Value can be either:
804+
- a number (the revision number)
805+
- "latest" (the latest revision)
806+
- "latest_enabled" (the latest enabled revision).
804807
:return: :class:`SecretVersion <SecretVersion>`
805808
806809
Usage:
@@ -840,7 +843,10 @@ def get_secret_version_by_name(
840843
:param region: Region to target. If none is passed will use default region from the config.
841844
:param secret_name: Name of the secret.
842845
:param revision: Version number.
843-
The first version of the secret is numbered 1, and all subsequent revisions augment by 1. Value can be a number or "latest".
846+
The first version of the secret is numbered 1, and all subsequent revisions augment by 1. Value can be either:
847+
- a number (the revision number)
848+
- "latest" (the latest revision)
849+
- "latest_enabled" (the latest enabled revision).
844850
:param project_id: ID of the Project to target.
845851
(Optional.) If not specified, Secret Manager will look for the secret version in all Projects.
846852
:return: :class:`SecretVersion <SecretVersion>`
@@ -885,7 +891,10 @@ def update_secret_version(
885891
:param region: Region to target. If none is passed will use default region from the config.
886892
:param secret_id: ID of the secret.
887893
:param revision: Version number.
888-
The first version of the secret is numbered 1, and all subsequent revisions augment by 1. Value can be a number or "latest".
894+
The first version of the secret is numbered 1, and all subsequent revisions augment by 1. Value can be either:
895+
- a number (the revision number)
896+
- "latest" (the latest revision)
897+
- "latest_enabled" (the latest enabled revision).
889898
:param description: Description of the version.
890899
:return: :class:`SecretVersion <SecretVersion>`
891900
@@ -1104,7 +1113,10 @@ def enable_secret_version(
11041113
:param region: Region to target. If none is passed will use default region from the config.
11051114
:param secret_id: ID of the secret.
11061115
:param revision: Version number.
1107-
The first version of the secret is numbered 1, and all subsequent revisions augment by 1. Value can be a number or "latest".
1116+
The first version of the secret is numbered 1, and all subsequent revisions augment by 1. Value can be either:
1117+
- a number (the revision number)
1118+
- "latest" (the latest revision)
1119+
- "latest_enabled" (the latest enabled revision).
11081120
:return: :class:`SecretVersion <SecretVersion>`
11091121
11101122
Usage:
@@ -1143,7 +1155,10 @@ def disable_secret_version(
11431155
:param region: Region to target. If none is passed will use default region from the config.
11441156
:param secret_id: ID of the secret.
11451157
:param revision: Version number.
1146-
The first version of the secret is numbered 1, and all subsequent revisions augment by 1. Value can be a number or "latest".
1158+
The first version of the secret is numbered 1, and all subsequent revisions augment by 1. Value can be either:
1159+
- a number (the revision number)
1160+
- "latest" (the latest revision)
1161+
- "latest_enabled" (the latest enabled revision).
11471162
:return: :class:`SecretVersion <SecretVersion>`
11481163
11491164
Usage:
@@ -1182,7 +1197,10 @@ def access_secret_version(
11821197
:param region: Region to target. If none is passed will use default region from the config.
11831198
:param secret_id: ID of the secret.
11841199
:param revision: Version number.
1185-
The first version of the secret is numbered 1, and all subsequent revisions augment by 1. Value can be a number or "latest".
1200+
The first version of the secret is numbered 1, and all subsequent revisions augment by 1. Value can be either:
1201+
- a number (the revision number)
1202+
- "latest" (the latest revision)
1203+
- "latest_enabled" (the latest enabled revision).
11861204
:return: :class:`AccessSecretVersionResponse <AccessSecretVersionResponse>`
11871205
11881206
Usage:
@@ -1222,7 +1240,10 @@ def access_secret_version_by_name(
12221240
:param region: Region to target. If none is passed will use default region from the config.
12231241
:param secret_name: Name of the secret.
12241242
:param revision: Version number.
1225-
The first version of the secret is numbered 1, and all subsequent revisions augment by 1. Value can be a number or "latest".
1243+
The first version of the secret is numbered 1, and all subsequent revisions augment by 1. Value can be either:
1244+
- a number (the revision number)
1245+
- "latest" (the latest revision)
1246+
- "latest_enabled" (the latest enabled revision).
12261247
:param project_id: ID of the Project to target.
12271248
(Optional.) If not specified, Secret Manager will look for the secret version in all Projects.
12281249
:return: :class:`AccessSecretVersionResponse <AccessSecretVersionResponse>`
@@ -1266,7 +1287,10 @@ def destroy_secret_version(
12661287
:param region: Region to target. If none is passed will use default region from the config.
12671288
:param secret_id: ID of the secret.
12681289
:param revision: Version number.
1269-
The first version of the secret is numbered 1, and all subsequent revisions augment by 1. Value can be a number or "latest".
1290+
The first version of the secret is numbered 1, and all subsequent revisions augment by 1. Value can be either:
1291+
- a number (the revision number)
1292+
- "latest" (the latest revision)
1293+
- "latest_enabled" (the latest enabled revision).
12701294
:return: :class:`SecretVersion <SecretVersion>`
12711295
12721296
Usage:

scaleway/scaleway/secret/v1alpha1/types.py

Lines changed: 32 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -744,7 +744,10 @@ class GetSecretVersionRequest:
744744
revision: str
745745
"""
746746
Version number.
747-
The first version of the secret is numbered 1, and all subsequent revisions augment by 1. Value can be a number or "latest".
747+
The first version of the secret is numbered 1, and all subsequent revisions augment by 1. Value can be either:
748+
- a number (the revision number)
749+
- "latest" (the latest revision)
750+
- "latest_enabled" (the latest enabled revision).
748751
"""
749752

750753

@@ -763,7 +766,10 @@ class GetSecretVersionByNameRequest:
763766
revision: str
764767
"""
765768
Version number.
766-
The first version of the secret is numbered 1, and all subsequent revisions augment by 1. Value can be a number or "latest".
769+
The first version of the secret is numbered 1, and all subsequent revisions augment by 1. Value can be either:
770+
- a number (the revision number)
771+
- "latest" (the latest revision)
772+
- "latest_enabled" (the latest enabled revision).
767773
"""
768774

769775
project_id: Optional[str]
@@ -788,7 +794,10 @@ class UpdateSecretVersionRequest:
788794
revision: str
789795
"""
790796
Version number.
791-
The first version of the secret is numbered 1, and all subsequent revisions augment by 1. Value can be a number or "latest".
797+
The first version of the secret is numbered 1, and all subsequent revisions augment by 1. Value can be either:
798+
- a number (the revision number)
799+
- "latest" (the latest revision)
800+
- "latest_enabled" (the latest enabled revision).
792801
"""
793802

794803
description: Optional[str]
@@ -862,7 +871,10 @@ class EnableSecretVersionRequest:
862871
revision: str
863872
"""
864873
Version number.
865-
The first version of the secret is numbered 1, and all subsequent revisions augment by 1. Value can be a number or "latest".
874+
The first version of the secret is numbered 1, and all subsequent revisions augment by 1. Value can be either:
875+
- a number (the revision number)
876+
- "latest" (the latest revision)
877+
- "latest_enabled" (the latest enabled revision).
866878
"""
867879

868880

@@ -881,7 +893,10 @@ class DisableSecretVersionRequest:
881893
revision: str
882894
"""
883895
Version number.
884-
The first version of the secret is numbered 1, and all subsequent revisions augment by 1. Value can be a number or "latest".
896+
The first version of the secret is numbered 1, and all subsequent revisions augment by 1. Value can be either:
897+
- a number (the revision number)
898+
- "latest" (the latest revision)
899+
- "latest_enabled" (the latest enabled revision).
885900
"""
886901

887902

@@ -900,7 +915,10 @@ class AccessSecretVersionRequest:
900915
revision: str
901916
"""
902917
Version number.
903-
The first version of the secret is numbered 1, and all subsequent revisions augment by 1. Value can be a number or "latest".
918+
The first version of the secret is numbered 1, and all subsequent revisions augment by 1. Value can be either:
919+
- a number (the revision number)
920+
- "latest" (the latest revision)
921+
- "latest_enabled" (the latest enabled revision).
904922
"""
905923

906924

@@ -919,7 +937,10 @@ class AccessSecretVersionByNameRequest:
919937
revision: str
920938
"""
921939
Version number.
922-
The first version of the secret is numbered 1, and all subsequent revisions augment by 1. Value can be a number or "latest".
940+
The first version of the secret is numbered 1, and all subsequent revisions augment by 1. Value can be either:
941+
- a number (the revision number)
942+
- "latest" (the latest revision)
943+
- "latest_enabled" (the latest enabled revision).
923944
"""
924945

925946
project_id: Optional[str]
@@ -944,7 +965,10 @@ class DestroySecretVersionRequest:
944965
revision: str
945966
"""
946967
Version number.
947-
The first version of the secret is numbered 1, and all subsequent revisions augment by 1. Value can be a number or "latest".
968+
The first version of the secret is numbered 1, and all subsequent revisions augment by 1. Value can be either:
969+
- a number (the revision number)
970+
- "latest" (the latest revision)
971+
- "latest_enabled" (the latest enabled revision).
948972
"""
949973

950974

0 commit comments

Comments
 (0)