File tree Expand file tree Collapse file tree 6 files changed +28
-0
lines changed
scaleway-async/scaleway_async/secret/v1alpha1
scaleway/scaleway/secret/v1alpha1 Expand file tree Collapse file tree 6 files changed +28
-0
lines changed Original file line number Diff line number Diff line change @@ -68,6 +68,7 @@ async def create_secret(
68
68
* ,
69
69
name : str ,
70
70
type_ : SecretType ,
71
+ is_protected : bool ,
71
72
region : Optional [Region ] = None ,
72
73
project_id : Optional [str ] = None ,
73
74
tags : Optional [List [str ]] = None ,
@@ -89,6 +90,8 @@ async def create_secret(
89
90
(Optional.) Location of the secret in the directory structure. If not specified, the path is `/`.
90
91
:param ephemeral_policy: Ephemeral policy of the secret.
91
92
(Optional.) Policy that defines whether/when a secret's versions expire. By default, the policy is applied to all the secret's versions.
93
+ :param is_protected: Returns `true` if secret protection is enabled on a given secret.
94
+ A protected secret cannot be deleted.
92
95
:return: :class:`Secret <Secret>`
93
96
94
97
Usage:
@@ -97,6 +100,7 @@ async def create_secret(
97
100
result = await api.create_secret(
98
101
name="example",
99
102
type_=unknown_secret_type,
103
+ is_protected=True,
100
104
)
101
105
"""
102
106
@@ -111,6 +115,7 @@ async def create_secret(
111
115
CreateSecretRequest (
112
116
name = name ,
113
117
type_ = type_ ,
118
+ is_protected = is_protected ,
114
119
region = region ,
115
120
project_id = project_id ,
116
121
tags = tags ,
Original file line number Diff line number Diff line change @@ -402,6 +402,9 @@ def marshal_CreateSecretRequest(
402
402
request .ephemeral_policy , defaults
403
403
)
404
404
405
+ if request .is_protected is not None :
406
+ output ["is_protected" ] = request .is_protected
407
+
405
408
if request .name is not None :
406
409
output ["name" ] = request .name
407
410
Original file line number Diff line number Diff line change @@ -482,6 +482,12 @@ class CreateSecretRequest:
482
482
(Optional.) Policy that defines whether/when a secret's versions expire. By default, the policy is applied to all the secret's versions.
483
483
"""
484
484
485
+ is_protected : bool
486
+ """
487
+ Returns `true` if secret protection is enabled on a given secret.
488
+ A protected secret cannot be deleted.
489
+ """
490
+
485
491
486
492
@dataclass
487
493
class CreateFolderRequest :
Original file line number Diff line number Diff line change @@ -68,6 +68,7 @@ def create_secret(
68
68
* ,
69
69
name : str ,
70
70
type_ : SecretType ,
71
+ is_protected : bool ,
71
72
region : Optional [Region ] = None ,
72
73
project_id : Optional [str ] = None ,
73
74
tags : Optional [List [str ]] = None ,
@@ -89,6 +90,8 @@ def create_secret(
89
90
(Optional.) Location of the secret in the directory structure. If not specified, the path is `/`.
90
91
:param ephemeral_policy: Ephemeral policy of the secret.
91
92
(Optional.) Policy that defines whether/when a secret's versions expire. By default, the policy is applied to all the secret's versions.
93
+ :param is_protected: Returns `true` if secret protection is enabled on a given secret.
94
+ A protected secret cannot be deleted.
92
95
:return: :class:`Secret <Secret>`
93
96
94
97
Usage:
@@ -97,6 +100,7 @@ def create_secret(
97
100
result = api.create_secret(
98
101
name="example",
99
102
type_=unknown_secret_type,
103
+ is_protected=True,
100
104
)
101
105
"""
102
106
@@ -111,6 +115,7 @@ def create_secret(
111
115
CreateSecretRequest (
112
116
name = name ,
113
117
type_ = type_ ,
118
+ is_protected = is_protected ,
114
119
region = region ,
115
120
project_id = project_id ,
116
121
tags = tags ,
Original file line number Diff line number Diff line change @@ -402,6 +402,9 @@ def marshal_CreateSecretRequest(
402
402
request .ephemeral_policy , defaults
403
403
)
404
404
405
+ if request .is_protected is not None :
406
+ output ["is_protected" ] = request .is_protected
407
+
405
408
if request .name is not None :
406
409
output ["name" ] = request .name
407
410
Original file line number Diff line number Diff line change @@ -482,6 +482,12 @@ class CreateSecretRequest:
482
482
(Optional.) Policy that defines whether/when a secret's versions expire. By default, the policy is applied to all the secret's versions.
483
483
"""
484
484
485
+ is_protected : bool
486
+ """
487
+ Returns `true` if secret protection is enabled on a given secret.
488
+ A protected secret cannot be deleted.
489
+ """
490
+
485
491
486
492
@dataclass
487
493
class CreateFolderRequest :
You can’t perform that action at this time.
0 commit comments