diff --git a/scaleway-async/scaleway_async/secret/v1beta1/api.py b/scaleway-async/scaleway_async/secret/v1beta1/api.py index 47fef12c0..ba9e33d19 100644 --- a/scaleway-async/scaleway_async/secret/v1beta1/api.py +++ b/scaleway-async/scaleway_async/secret/v1beta1/api.py @@ -242,6 +242,7 @@ async def delete_secret( async def list_secrets( self, *, + scheduled_for_deletion: bool, region: Optional[ScwRegion] = None, organization_id: Optional[str] = None, project_id: Optional[str] = None, @@ -253,11 +254,11 @@ async def list_secrets( path: Optional[str] = None, ephemeral: Optional[bool] = None, type_: Optional[SecretType] = None, - scheduled_for_deletion: Optional[bool] = None, ) -> ListSecretsResponse: """ List secrets. 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`. + :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. :param region: Region to target. If none is passed will use default region from the config. :param organization_id: Filter by Organization ID (optional). :param project_id: Filter by Project ID (optional). @@ -269,13 +270,14 @@ async def list_secrets( :param path: Filter by exact path (optional). :param ephemeral: Filter by ephemeral / not ephemeral (optional). :param type_: Filter by secret type (optional). - :param scheduled_for_deletion: Filter by whether the secret was scheduled for deletion / not scheduled for deletion (optional). :return: :class:`ListSecretsResponse ` Usage: :: - result = await api.list_secrets() + result = await api.list_secrets( + scheduled_for_deletion=False, + ) """ param_region = validate_path_param( @@ -307,6 +309,7 @@ async def list_secrets( async def list_secrets_all( self, *, + scheduled_for_deletion: bool, region: Optional[ScwRegion] = None, organization_id: Optional[str] = None, project_id: Optional[str] = None, @@ -318,11 +321,11 @@ async def list_secrets_all( path: Optional[str] = None, ephemeral: Optional[bool] = None, type_: Optional[SecretType] = None, - scheduled_for_deletion: Optional[bool] = None, ) -> List[Secret]: """ List secrets. 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`. + :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. :param region: Region to target. If none is passed will use default region from the config. :param organization_id: Filter by Organization ID (optional). :param project_id: Filter by Project ID (optional). @@ -334,13 +337,14 @@ async def list_secrets_all( :param path: Filter by exact path (optional). :param ephemeral: Filter by ephemeral / not ephemeral (optional). :param type_: Filter by secret type (optional). - :param scheduled_for_deletion: Filter by whether the secret was scheduled for deletion / not scheduled for deletion (optional). :return: :class:`List[Secret] ` Usage: :: - result = await api.list_secrets_all() + result = await api.list_secrets_all( + scheduled_for_deletion=False, + ) """ return await fetch_all_pages_async( @@ -348,6 +352,7 @@ async def list_secrets_all( key="secrets", fetcher=self.list_secrets, args={ + "scheduled_for_deletion": scheduled_for_deletion, "region": region, "organization_id": organization_id, "project_id": project_id, @@ -359,7 +364,6 @@ async def list_secrets_all( "path": path, "ephemeral": ephemeral, "type_": type_, - "scheduled_for_deletion": scheduled_for_deletion, }, ) diff --git a/scaleway-async/scaleway_async/secret/v1beta1/types.py b/scaleway-async/scaleway_async/secret/v1beta1/types.py index 338eaefd0..fe66cfee0 100644 --- a/scaleway-async/scaleway_async/secret/v1beta1/types.py +++ b/scaleway-async/scaleway_async/secret/v1beta1/types.py @@ -758,6 +758,11 @@ class ListSecretVersionsResponse: @dataclass class ListSecretsRequest: + scheduled_for_deletion: bool + """ + Filter by whether the secret was scheduled for deletion / not scheduled for deletion. By default, it will display only not scheduled for deletion secrets. + """ + region: Optional[ScwRegion] """ Region to target. If none is passed will use default region from the config. @@ -804,11 +809,6 @@ class ListSecretsRequest: Filter by secret type (optional). """ - scheduled_for_deletion: Optional[bool] - """ - Filter by whether the secret was scheduled for deletion / not scheduled for deletion (optional). - """ - @dataclass class ListSecretsResponse: diff --git a/scaleway/scaleway/secret/v1beta1/api.py b/scaleway/scaleway/secret/v1beta1/api.py index 9605f8654..bbe3bce8a 100644 --- a/scaleway/scaleway/secret/v1beta1/api.py +++ b/scaleway/scaleway/secret/v1beta1/api.py @@ -242,6 +242,7 @@ def delete_secret( def list_secrets( self, *, + scheduled_for_deletion: bool, region: Optional[ScwRegion] = None, organization_id: Optional[str] = None, project_id: Optional[str] = None, @@ -253,11 +254,11 @@ def list_secrets( path: Optional[str] = None, ephemeral: Optional[bool] = None, type_: Optional[SecretType] = None, - scheduled_for_deletion: Optional[bool] = None, ) -> ListSecretsResponse: """ List secrets. 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`. + :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. :param region: Region to target. If none is passed will use default region from the config. :param organization_id: Filter by Organization ID (optional). :param project_id: Filter by Project ID (optional). @@ -269,13 +270,14 @@ def list_secrets( :param path: Filter by exact path (optional). :param ephemeral: Filter by ephemeral / not ephemeral (optional). :param type_: Filter by secret type (optional). - :param scheduled_for_deletion: Filter by whether the secret was scheduled for deletion / not scheduled for deletion (optional). :return: :class:`ListSecretsResponse ` Usage: :: - result = api.list_secrets() + result = api.list_secrets( + scheduled_for_deletion=False, + ) """ param_region = validate_path_param( @@ -307,6 +309,7 @@ def list_secrets( def list_secrets_all( self, *, + scheduled_for_deletion: bool, region: Optional[ScwRegion] = None, organization_id: Optional[str] = None, project_id: Optional[str] = None, @@ -318,11 +321,11 @@ def list_secrets_all( path: Optional[str] = None, ephemeral: Optional[bool] = None, type_: Optional[SecretType] = None, - scheduled_for_deletion: Optional[bool] = None, ) -> List[Secret]: """ List secrets. 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`. + :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. :param region: Region to target. If none is passed will use default region from the config. :param organization_id: Filter by Organization ID (optional). :param project_id: Filter by Project ID (optional). @@ -334,13 +337,14 @@ def list_secrets_all( :param path: Filter by exact path (optional). :param ephemeral: Filter by ephemeral / not ephemeral (optional). :param type_: Filter by secret type (optional). - :param scheduled_for_deletion: Filter by whether the secret was scheduled for deletion / not scheduled for deletion (optional). :return: :class:`List[Secret] ` Usage: :: - result = api.list_secrets_all() + result = api.list_secrets_all( + scheduled_for_deletion=False, + ) """ return fetch_all_pages( @@ -348,6 +352,7 @@ def list_secrets_all( key="secrets", fetcher=self.list_secrets, args={ + "scheduled_for_deletion": scheduled_for_deletion, "region": region, "organization_id": organization_id, "project_id": project_id, @@ -359,7 +364,6 @@ def list_secrets_all( "path": path, "ephemeral": ephemeral, "type_": type_, - "scheduled_for_deletion": scheduled_for_deletion, }, ) diff --git a/scaleway/scaleway/secret/v1beta1/types.py b/scaleway/scaleway/secret/v1beta1/types.py index 338eaefd0..fe66cfee0 100644 --- a/scaleway/scaleway/secret/v1beta1/types.py +++ b/scaleway/scaleway/secret/v1beta1/types.py @@ -758,6 +758,11 @@ class ListSecretVersionsResponse: @dataclass class ListSecretsRequest: + scheduled_for_deletion: bool + """ + Filter by whether the secret was scheduled for deletion / not scheduled for deletion. By default, it will display only not scheduled for deletion secrets. + """ + region: Optional[ScwRegion] """ Region to target. If none is passed will use default region from the config. @@ -804,11 +809,6 @@ class ListSecretsRequest: Filter by secret type (optional). """ - scheduled_for_deletion: Optional[bool] - """ - Filter by whether the secret was scheduled for deletion / not scheduled for deletion (optional). - """ - @dataclass class ListSecretsResponse: