Skip to content

Commit ad6a67a

Browse files
authored
docs(secret_manager): change documentation for scheduled deletion (#885)
1 parent 065b97b commit ad6a67a

File tree

4 files changed

+32
-24
lines changed

4 files changed

+32
-24
lines changed

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

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,7 @@ async def delete_secret(
242242
async def list_secrets(
243243
self,
244244
*,
245+
scheduled_for_deletion: bool,
245246
region: Optional[ScwRegion] = None,
246247
organization_id: Optional[str] = None,
247248
project_id: Optional[str] = None,
@@ -253,11 +254,11 @@ async def list_secrets(
253254
path: Optional[str] = None,
254255
ephemeral: Optional[bool] = None,
255256
type_: Optional[SecretType] = None,
256-
scheduled_for_deletion: Optional[bool] = None,
257257
) -> ListSecretsResponse:
258258
"""
259259
List secrets.
260260
Retrieve the list of secrets created within an Organization and/or Project. You must specify either the `organization_id` or the `project_id` and the `region`.
261+
:param scheduled_for_deletion: Filter by whether the secret was scheduled for deletion / not scheduled for deletion. By default, it will display only not scheduled for deletion secrets.
261262
:param region: Region to target. If none is passed will use default region from the config.
262263
:param organization_id: Filter by Organization ID (optional).
263264
:param project_id: Filter by Project ID (optional).
@@ -269,13 +270,14 @@ async def list_secrets(
269270
:param path: Filter by exact path (optional).
270271
:param ephemeral: Filter by ephemeral / not ephemeral (optional).
271272
:param type_: Filter by secret type (optional).
272-
:param scheduled_for_deletion: Filter by whether the secret was scheduled for deletion / not scheduled for deletion (optional).
273273
:return: :class:`ListSecretsResponse <ListSecretsResponse>`
274274
275275
Usage:
276276
::
277277
278-
result = await api.list_secrets()
278+
result = await api.list_secrets(
279+
scheduled_for_deletion=False,
280+
)
279281
"""
280282

281283
param_region = validate_path_param(
@@ -307,6 +309,7 @@ async def list_secrets(
307309
async def list_secrets_all(
308310
self,
309311
*,
312+
scheduled_for_deletion: bool,
310313
region: Optional[ScwRegion] = None,
311314
organization_id: Optional[str] = None,
312315
project_id: Optional[str] = None,
@@ -318,11 +321,11 @@ async def list_secrets_all(
318321
path: Optional[str] = None,
319322
ephemeral: Optional[bool] = None,
320323
type_: Optional[SecretType] = None,
321-
scheduled_for_deletion: Optional[bool] = None,
322324
) -> List[Secret]:
323325
"""
324326
List secrets.
325327
Retrieve the list of secrets created within an Organization and/or Project. You must specify either the `organization_id` or the `project_id` and the `region`.
328+
:param scheduled_for_deletion: Filter by whether the secret was scheduled for deletion / not scheduled for deletion. By default, it will display only not scheduled for deletion secrets.
326329
:param region: Region to target. If none is passed will use default region from the config.
327330
:param organization_id: Filter by Organization ID (optional).
328331
:param project_id: Filter by Project ID (optional).
@@ -334,20 +337,22 @@ async def list_secrets_all(
334337
:param path: Filter by exact path (optional).
335338
:param ephemeral: Filter by ephemeral / not ephemeral (optional).
336339
:param type_: Filter by secret type (optional).
337-
:param scheduled_for_deletion: Filter by whether the secret was scheduled for deletion / not scheduled for deletion (optional).
338340
:return: :class:`List[Secret] <List[Secret]>`
339341
340342
Usage:
341343
::
342344
343-
result = await api.list_secrets_all()
345+
result = await api.list_secrets_all(
346+
scheduled_for_deletion=False,
347+
)
344348
"""
345349

346350
return await fetch_all_pages_async(
347351
type=ListSecretsResponse,
348352
key="secrets",
349353
fetcher=self.list_secrets,
350354
args={
355+
"scheduled_for_deletion": scheduled_for_deletion,
351356
"region": region,
352357
"organization_id": organization_id,
353358
"project_id": project_id,
@@ -359,7 +364,6 @@ async def list_secrets_all(
359364
"path": path,
360365
"ephemeral": ephemeral,
361366
"type_": type_,
362-
"scheduled_for_deletion": scheduled_for_deletion,
363367
},
364368
)
365369

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -758,6 +758,11 @@ class ListSecretVersionsResponse:
758758

759759
@dataclass
760760
class ListSecretsRequest:
761+
scheduled_for_deletion: bool
762+
"""
763+
Filter by whether the secret was scheduled for deletion / not scheduled for deletion. By default, it will display only not scheduled for deletion secrets.
764+
"""
765+
761766
region: Optional[ScwRegion]
762767
"""
763768
Region to target. If none is passed will use default region from the config.
@@ -804,11 +809,6 @@ class ListSecretsRequest:
804809
Filter by secret type (optional).
805810
"""
806811

807-
scheduled_for_deletion: Optional[bool]
808-
"""
809-
Filter by whether the secret was scheduled for deletion / not scheduled for deletion (optional).
810-
"""
811-
812812

813813
@dataclass
814814
class ListSecretsResponse:

scaleway/scaleway/secret/v1beta1/api.py

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,7 @@ def delete_secret(
242242
def list_secrets(
243243
self,
244244
*,
245+
scheduled_for_deletion: bool,
245246
region: Optional[ScwRegion] = None,
246247
organization_id: Optional[str] = None,
247248
project_id: Optional[str] = None,
@@ -253,11 +254,11 @@ def list_secrets(
253254
path: Optional[str] = None,
254255
ephemeral: Optional[bool] = None,
255256
type_: Optional[SecretType] = None,
256-
scheduled_for_deletion: Optional[bool] = None,
257257
) -> ListSecretsResponse:
258258
"""
259259
List secrets.
260260
Retrieve the list of secrets created within an Organization and/or Project. You must specify either the `organization_id` or the `project_id` and the `region`.
261+
:param scheduled_for_deletion: Filter by whether the secret was scheduled for deletion / not scheduled for deletion. By default, it will display only not scheduled for deletion secrets.
261262
:param region: Region to target. If none is passed will use default region from the config.
262263
:param organization_id: Filter by Organization ID (optional).
263264
:param project_id: Filter by Project ID (optional).
@@ -269,13 +270,14 @@ def list_secrets(
269270
:param path: Filter by exact path (optional).
270271
:param ephemeral: Filter by ephemeral / not ephemeral (optional).
271272
:param type_: Filter by secret type (optional).
272-
:param scheduled_for_deletion: Filter by whether the secret was scheduled for deletion / not scheduled for deletion (optional).
273273
:return: :class:`ListSecretsResponse <ListSecretsResponse>`
274274
275275
Usage:
276276
::
277277
278-
result = api.list_secrets()
278+
result = api.list_secrets(
279+
scheduled_for_deletion=False,
280+
)
279281
"""
280282

281283
param_region = validate_path_param(
@@ -307,6 +309,7 @@ def list_secrets(
307309
def list_secrets_all(
308310
self,
309311
*,
312+
scheduled_for_deletion: bool,
310313
region: Optional[ScwRegion] = None,
311314
organization_id: Optional[str] = None,
312315
project_id: Optional[str] = None,
@@ -318,11 +321,11 @@ def list_secrets_all(
318321
path: Optional[str] = None,
319322
ephemeral: Optional[bool] = None,
320323
type_: Optional[SecretType] = None,
321-
scheduled_for_deletion: Optional[bool] = None,
322324
) -> List[Secret]:
323325
"""
324326
List secrets.
325327
Retrieve the list of secrets created within an Organization and/or Project. You must specify either the `organization_id` or the `project_id` and the `region`.
328+
:param scheduled_for_deletion: Filter by whether the secret was scheduled for deletion / not scheduled for deletion. By default, it will display only not scheduled for deletion secrets.
326329
:param region: Region to target. If none is passed will use default region from the config.
327330
:param organization_id: Filter by Organization ID (optional).
328331
:param project_id: Filter by Project ID (optional).
@@ -334,20 +337,22 @@ def list_secrets_all(
334337
:param path: Filter by exact path (optional).
335338
:param ephemeral: Filter by ephemeral / not ephemeral (optional).
336339
:param type_: Filter by secret type (optional).
337-
:param scheduled_for_deletion: Filter by whether the secret was scheduled for deletion / not scheduled for deletion (optional).
338340
:return: :class:`List[Secret] <List[Secret]>`
339341
340342
Usage:
341343
::
342344
343-
result = api.list_secrets_all()
345+
result = api.list_secrets_all(
346+
scheduled_for_deletion=False,
347+
)
344348
"""
345349

346350
return fetch_all_pages(
347351
type=ListSecretsResponse,
348352
key="secrets",
349353
fetcher=self.list_secrets,
350354
args={
355+
"scheduled_for_deletion": scheduled_for_deletion,
351356
"region": region,
352357
"organization_id": organization_id,
353358
"project_id": project_id,
@@ -359,7 +364,6 @@ def list_secrets_all(
359364
"path": path,
360365
"ephemeral": ephemeral,
361366
"type_": type_,
362-
"scheduled_for_deletion": scheduled_for_deletion,
363367
},
364368
)
365369

scaleway/scaleway/secret/v1beta1/types.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -758,6 +758,11 @@ class ListSecretVersionsResponse:
758758

759759
@dataclass
760760
class ListSecretsRequest:
761+
scheduled_for_deletion: bool
762+
"""
763+
Filter by whether the secret was scheduled for deletion / not scheduled for deletion. By default, it will display only not scheduled for deletion secrets.
764+
"""
765+
761766
region: Optional[ScwRegion]
762767
"""
763768
Region to target. If none is passed will use default region from the config.
@@ -804,11 +809,6 @@ class ListSecretsRequest:
804809
Filter by secret type (optional).
805810
"""
806811

807-
scheduled_for_deletion: Optional[bool]
808-
"""
809-
Filter by whether the secret was scheduled for deletion / not scheduled for deletion (optional).
810-
"""
811-
812812

813813
@dataclass
814814
class ListSecretsResponse:

0 commit comments

Comments
 (0)