Skip to content

Commit 2a0a08a

Browse files
authored
feat(secret_manager): deprecate byname api endpoints (#368)
1 parent b9a5c19 commit 2a0a08a

File tree

2 files changed

+40
-0
lines changed
  • scaleway-async/scaleway_async/secret/v1alpha1
  • scaleway/scaleway/secret/v1alpha1

2 files changed

+40
-0
lines changed

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

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -856,6 +856,10 @@ async def get_secret_version_by_name(
856856
"""
857857
Get metadata of a secret's version using the secret's name.
858858
Retrieve the metadata of a secret's given version specified by the `region`, `secret_name`, `revision` and `project_id` parameters.
859+
860+
This method is deprecated.
861+
862+
Scaleway recommends that you use the `ListSecrets` request with the `name` filter to specify the secret version desired, then use the `GetSecretVersion` request.
859863
:param region: Region to target. If none is passed will use default region from the config.
860864
:param secret_name: Name of the secret.
861865
:param revision: Version number.
@@ -866,6 +870,7 @@ async def get_secret_version_by_name(
866870
:param project_id: ID of the Project to target.
867871
(Optional.) If not specified, Secret Manager will look for the secret version in all Projects.
868872
:return: :class:`SecretVersion <SecretVersion>`
873+
:deprecated
869874
870875
Usage:
871876
::
@@ -1040,6 +1045,10 @@ async def list_secret_versions_by_name(
10401045
"""
10411046
List versions of a secret using the secret's name.
10421047
Retrieve the list of a given secret's versions specified by the `secret_name`,`region` and `project_id` parameters.
1048+
1049+
This method is deprecated.
1050+
1051+
Scaleway recommends that you use the `ListSecrets` request with the `name` filter to specify the secret version desired, then use the `ListSecretVersions` request.
10431052
:param region: Region to target. If none is passed will use default region from the config.
10441053
:param secret_name: Name of the secret.
10451054
:param page:
@@ -1048,6 +1057,7 @@ async def list_secret_versions_by_name(
10481057
:param project_id: ID of the Project to target.
10491058
(Optional.) If not specified, Secret Manager will look for the secret in all Projects.
10501059
:return: :class:`ListSecretVersionsResponse <ListSecretVersionsResponse>`
1060+
:deprecated
10511061
10521062
Usage:
10531063
::
@@ -1087,6 +1097,10 @@ async def list_secret_versions_by_name_all(
10871097
"""
10881098
List versions of a secret using the secret's name.
10891099
Retrieve the list of a given secret's versions specified by the `secret_name`,`region` and `project_id` parameters.
1100+
1101+
This method is deprecated.
1102+
1103+
Scaleway recommends that you use the `ListSecrets` request with the `name` filter to specify the secret version desired, then use the `ListSecretVersions` request.
10901104
:param region: Region to target. If none is passed will use default region from the config.
10911105
:param secret_name: Name of the secret.
10921106
:param page:
@@ -1095,6 +1109,7 @@ async def list_secret_versions_by_name_all(
10951109
:param project_id: ID of the Project to target.
10961110
(Optional.) If not specified, Secret Manager will look for the secret in all Projects.
10971111
:return: :class:`List[ListSecretVersionsResponse] <List[ListSecretVersionsResponse]>`
1112+
:deprecated
10981113
10991114
Usage:
11001115
::
@@ -1253,6 +1268,10 @@ async def access_secret_version_by_name(
12531268
"""
12541269
Access a secret's version using the secret's name.
12551270
Access sensitive data in a secret's version specified by the `region`, `secret_name`, `revision` and `project_id` parameters.
1271+
1272+
This method is deprecated.
1273+
1274+
Scaleway recommends that you use the `ListSecrets` request with the `name` filter to specify the secret version desired, then use the `AccessSecretVersion` request.
12561275
:param region: Region to target. If none is passed will use default region from the config.
12571276
:param secret_name: Name of the secret.
12581277
:param revision: Version number.
@@ -1263,6 +1282,7 @@ async def access_secret_version_by_name(
12631282
:param project_id: ID of the Project to target.
12641283
(Optional.) If not specified, Secret Manager will look for the secret version in all Projects.
12651284
:return: :class:`AccessSecretVersionResponse <AccessSecretVersionResponse>`
1285+
:deprecated
12661286
12671287
Usage:
12681288
::

scaleway/scaleway/secret/v1alpha1/api.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -856,6 +856,10 @@ def get_secret_version_by_name(
856856
"""
857857
Get metadata of a secret's version using the secret's name.
858858
Retrieve the metadata of a secret's given version specified by the `region`, `secret_name`, `revision` and `project_id` parameters.
859+
860+
This method is deprecated.
861+
862+
Scaleway recommends that you use the `ListSecrets` request with the `name` filter to specify the secret version desired, then use the `GetSecretVersion` request.
859863
:param region: Region to target. If none is passed will use default region from the config.
860864
:param secret_name: Name of the secret.
861865
:param revision: Version number.
@@ -866,6 +870,7 @@ def get_secret_version_by_name(
866870
:param project_id: ID of the Project to target.
867871
(Optional.) If not specified, Secret Manager will look for the secret version in all Projects.
868872
:return: :class:`SecretVersion <SecretVersion>`
873+
:deprecated
869874
870875
Usage:
871876
::
@@ -1040,6 +1045,10 @@ def list_secret_versions_by_name(
10401045
"""
10411046
List versions of a secret using the secret's name.
10421047
Retrieve the list of a given secret's versions specified by the `secret_name`,`region` and `project_id` parameters.
1048+
1049+
This method is deprecated.
1050+
1051+
Scaleway recommends that you use the `ListSecrets` request with the `name` filter to specify the secret version desired, then use the `ListSecretVersions` request.
10431052
:param region: Region to target. If none is passed will use default region from the config.
10441053
:param secret_name: Name of the secret.
10451054
:param page:
@@ -1048,6 +1057,7 @@ def list_secret_versions_by_name(
10481057
:param project_id: ID of the Project to target.
10491058
(Optional.) If not specified, Secret Manager will look for the secret in all Projects.
10501059
:return: :class:`ListSecretVersionsResponse <ListSecretVersionsResponse>`
1060+
:deprecated
10511061
10521062
Usage:
10531063
::
@@ -1087,6 +1097,10 @@ def list_secret_versions_by_name_all(
10871097
"""
10881098
List versions of a secret using the secret's name.
10891099
Retrieve the list of a given secret's versions specified by the `secret_name`,`region` and `project_id` parameters.
1100+
1101+
This method is deprecated.
1102+
1103+
Scaleway recommends that you use the `ListSecrets` request with the `name` filter to specify the secret version desired, then use the `ListSecretVersions` request.
10901104
:param region: Region to target. If none is passed will use default region from the config.
10911105
:param secret_name: Name of the secret.
10921106
:param page:
@@ -1095,6 +1109,7 @@ def list_secret_versions_by_name_all(
10951109
:param project_id: ID of the Project to target.
10961110
(Optional.) If not specified, Secret Manager will look for the secret in all Projects.
10971111
:return: :class:`List[ListSecretVersionsResponse] <List[ListSecretVersionsResponse]>`
1112+
:deprecated
10981113
10991114
Usage:
11001115
::
@@ -1253,6 +1268,10 @@ def access_secret_version_by_name(
12531268
"""
12541269
Access a secret's version using the secret's name.
12551270
Access sensitive data in a secret's version specified by the `region`, `secret_name`, `revision` and `project_id` parameters.
1271+
1272+
This method is deprecated.
1273+
1274+
Scaleway recommends that you use the `ListSecrets` request with the `name` filter to specify the secret version desired, then use the `AccessSecretVersion` request.
12561275
:param region: Region to target. If none is passed will use default region from the config.
12571276
:param secret_name: Name of the secret.
12581277
:param revision: Version number.
@@ -1263,6 +1282,7 @@ def access_secret_version_by_name(
12631282
:param project_id: ID of the Project to target.
12641283
(Optional.) If not specified, Secret Manager will look for the secret version in all Projects.
12651284
:return: :class:`AccessSecretVersionResponse <AccessSecretVersionResponse>`
1285+
:deprecated
12661286
12671287
Usage:
12681288
::

0 commit comments

Comments
 (0)