File tree Expand file tree Collapse file tree 8 files changed +54
-12
lines changed
scaleway-async/scaleway_async/secret/v1alpha1
scaleway/scaleway/secret/v1alpha1 Expand file tree Collapse file tree 8 files changed +54
-12
lines changed Original file line number Diff line number Diff line change 11# This file was automatically generated. DO NOT EDIT.
22# If you have any remark or suggestion do not hesitate to open an issue.
33from .types import ListSecretsRequestOrderBy
4+ from .types import Product
45from .types import SecretStatus
56from .types import SecretVersionStatus
67from .types import AccessSecretVersionResponse
1314
1415__all__ = [
1516 "ListSecretsRequestOrderBy" ,
17+ "Product" ,
1618 "SecretStatus" ,
1719 "SecretVersionStatus" ,
1820 "AccessSecretVersionResponse" ,
Original file line number Diff line number Diff line change 1313)
1414from .types import (
1515 ListSecretsRequestOrderBy ,
16+ Product ,
1617 SecretVersionStatus ,
1718 AccessSecretVersionResponse ,
1819 ListSecretVersionsResponse ,
@@ -356,21 +357,23 @@ async def add_secret_owner(
356357 self ,
357358 * ,
358359 secret_id : str ,
359- product_name : str ,
360+ product : Product ,
360361 region : Optional [Region ] = None ,
362+ product_name : Optional [str ] = None ,
361363 ) -> Optional [None ]:
362364 """
363365 Allow a product to use the secret.
364366 :param region: Region to target. If none is passed will use default region from the config.
365367 :param secret_id: ID of the secret.
366- :param product_name: Name of the product to add.
368+ :param product_name: (Deprecated: use product field) ID of the product to add (see product enum).
369+ :param product: ID of the product to add (see product enum).
367370
368371 Usage:
369372 ::
370373
371374 result = await api.add_secret_owner(
372375 secret_id="example",
373- product_name="example" ,
376+ product=unknown ,
374377 )
375378 """
376379
@@ -385,8 +388,9 @@ async def add_secret_owner(
385388 body = marshal_AddSecretOwnerRequest (
386389 AddSecretOwnerRequest (
387390 secret_id = secret_id ,
388- product_name = product_name ,
391+ product = product ,
389392 region = region ,
393+ product_name = product_name ,
390394 ),
391395 self .client ,
392396 ),
Original file line number Diff line number Diff line change 1010)
1111from dateutil import parser
1212from .types import (
13+ Product ,
1314 AccessSecretVersionResponse ,
1415 ListSecretVersionsResponse ,
1516 ListSecretsResponse ,
@@ -176,6 +177,7 @@ def marshal_AddSecretOwnerRequest(
176177 defaults : ProfileDefaults ,
177178) -> Dict [str , Any ]:
178179 return {
180+ "product" : Product (request .product ),
179181 "product_name" : request .product_name ,
180182 }
181183
Original file line number Diff line number Diff line change @@ -24,6 +24,13 @@ def __str__(self) -> str:
2424 return str (self .value )
2525
2626
27+ class Product (str , Enum ):
28+ UNKNOWN = "unknown"
29+
30+ def __str__ (self ) -> str :
31+ return str (self .value )
32+
33+
2734class SecretStatus (str , Enum ):
2835 READY = "ready"
2936 LOCKED = "locked"
@@ -400,9 +407,15 @@ class AddSecretOwnerRequest:
400407 ID of the secret.
401408 """
402409
403- product_name : str
410+ product_name : Optional [str ]
411+ """
412+ (Deprecated: use product field) ID of the product to add (see product enum).
413+ :deprecated
414+ """
415+
416+ product : Product
404417 """
405- Name of the product to add.
418+ ID of the product to add (see product enum) .
406419 """
407420
408421
Original file line number Diff line number Diff line change 11# This file was automatically generated. DO NOT EDIT.
22# If you have any remark or suggestion do not hesitate to open an issue.
33from .types import ListSecretsRequestOrderBy
4+ from .types import Product
45from .types import SecretStatus
56from .types import SecretVersionStatus
67from .types import AccessSecretVersionResponse
1314
1415__all__ = [
1516 "ListSecretsRequestOrderBy" ,
17+ "Product" ,
1618 "SecretStatus" ,
1719 "SecretVersionStatus" ,
1820 "AccessSecretVersionResponse" ,
Original file line number Diff line number Diff line change 1313)
1414from .types import (
1515 ListSecretsRequestOrderBy ,
16+ Product ,
1617 SecretVersionStatus ,
1718 AccessSecretVersionResponse ,
1819 ListSecretVersionsResponse ,
@@ -356,21 +357,23 @@ def add_secret_owner(
356357 self ,
357358 * ,
358359 secret_id : str ,
359- product_name : str ,
360+ product : Product ,
360361 region : Optional [Region ] = None ,
362+ product_name : Optional [str ] = None ,
361363 ) -> Optional [None ]:
362364 """
363365 Allow a product to use the secret.
364366 :param region: Region to target. If none is passed will use default region from the config.
365367 :param secret_id: ID of the secret.
366- :param product_name: Name of the product to add.
368+ :param product_name: (Deprecated: use product field) ID of the product to add (see product enum).
369+ :param product: ID of the product to add (see product enum).
367370
368371 Usage:
369372 ::
370373
371374 result = api.add_secret_owner(
372375 secret_id="example",
373- product_name="example" ,
376+ product=unknown ,
374377 )
375378 """
376379
@@ -385,8 +388,9 @@ def add_secret_owner(
385388 body = marshal_AddSecretOwnerRequest (
386389 AddSecretOwnerRequest (
387390 secret_id = secret_id ,
388- product_name = product_name ,
391+ product = product ,
389392 region = region ,
393+ product_name = product_name ,
390394 ),
391395 self .client ,
392396 ),
Original file line number Diff line number Diff line change 1010)
1111from dateutil import parser
1212from .types import (
13+ Product ,
1314 AccessSecretVersionResponse ,
1415 ListSecretVersionsResponse ,
1516 ListSecretsResponse ,
@@ -176,6 +177,7 @@ def marshal_AddSecretOwnerRequest(
176177 defaults : ProfileDefaults ,
177178) -> Dict [str , Any ]:
178179 return {
180+ "product" : Product (request .product ),
179181 "product_name" : request .product_name ,
180182 }
181183
Original file line number Diff line number Diff line change @@ -24,6 +24,13 @@ def __str__(self) -> str:
2424 return str (self .value )
2525
2626
27+ class Product (str , Enum ):
28+ UNKNOWN = "unknown"
29+
30+ def __str__ (self ) -> str :
31+ return str (self .value )
32+
33+
2734class SecretStatus (str , Enum ):
2835 READY = "ready"
2936 LOCKED = "locked"
@@ -400,9 +407,15 @@ class AddSecretOwnerRequest:
400407 ID of the secret.
401408 """
402409
403- product_name : str
410+ product_name : Optional [str ]
411+ """
412+ (Deprecated: use product field) ID of the product to add (see product enum).
413+ :deprecated
414+ """
415+
416+ product : Product
404417 """
405- Name of the product to add.
418+ ID of the product to add (see product enum) .
406419 """
407420
408421
You can’t perform that action at this time.
0 commit comments