Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions scaleway-async/scaleway_async/iam/v1alpha1/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# This file was automatically generated. DO NOT EDIT.
# If you have any remark or suggestion do not hesitate to open an issue.
from .types import ListAPIKeysRequestBearerType
from .types import ListAPIKeysRequestOrderBy
from .types import ListApplicationsRequestOrderBy
from .types import ListGroupsRequestOrderBy
Expand Down Expand Up @@ -31,6 +32,7 @@
from .api import IamV1Alpha1API

__all__ = [
"ListAPIKeysRequestBearerType",
"ListAPIKeysRequestOrderBy",
"ListApplicationsRequestOrderBy",
"ListGroupsRequestOrderBy",
Expand Down
31 changes: 31 additions & 0 deletions scaleway-async/scaleway_async/iam/v1alpha1/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
validate_path_param,
)
from .types import (
ListAPIKeysRequestBearerType,
ListAPIKeysRequestOrderBy,
ListApplicationsRequestOrderBy,
ListGroupsRequestOrderBy,
Expand Down Expand Up @@ -1472,6 +1473,11 @@ async def list_api_keys(
application_id: Optional[str] = None,
user_id: Optional[str] = None,
editable: Optional[bool] = None,
expirable: Optional[bool] = None,
access_key: Optional[str] = None,
description: Optional[str] = None,
bearer_id: Optional[str] = None,
bearer_type: ListAPIKeysRequestBearerType = ListAPIKeysRequestBearerType.UNKNOWN_BEARER_TYPE,
) -> ListAPIKeysResponse:
"""
List API keys
Expand All @@ -1486,6 +1492,11 @@ async def list_api_keys(

One-of ('bearer'): at most one of 'application_id', 'user_id' could be set.
:param editable: Filter out editable API keys or not
:param expirable: Filter out expirable API keys or not
:param access_key: Filter out by access key
:param description: Filter out by description
:param bearer_id: Filter out by bearer ID
:param bearer_type: Filter out by type of bearer
:return: :class:`ListAPIKeysResponse <ListAPIKeysResponse>`

Usage:
Expand All @@ -1498,7 +1509,12 @@ async def list_api_keys(
"GET",
f"/iam/v1alpha1/api-keys",
params={
"access_key": access_key,
"bearer_id": bearer_id,
"bearer_type": bearer_type,
"description": description,
"editable": editable,
"expirable": expirable,
"order_by": order_by,
"organization_id": organization_id
or self.client.default_organization_id,
Expand Down Expand Up @@ -1526,6 +1542,11 @@ async def list_api_keys_all(
application_id: Optional[str] = None,
user_id: Optional[str] = None,
editable: Optional[bool] = None,
expirable: Optional[bool] = None,
access_key: Optional[str] = None,
description: Optional[str] = None,
bearer_id: Optional[str] = None,
bearer_type: Optional[ListAPIKeysRequestBearerType] = None,
) -> List[APIKey]:
"""
List API keys
Expand All @@ -1540,6 +1561,11 @@ async def list_api_keys_all(

One-of ('bearer'): at most one of 'application_id', 'user_id' could be set.
:param editable: Filter out editable API keys or not
:param expirable: Filter out expirable API keys or not
:param access_key: Filter out by access key
:param description: Filter out by description
:param bearer_id: Filter out by bearer ID
:param bearer_type: Filter out by type of bearer
:return: :class:`List[ListAPIKeysResponse] <List[ListAPIKeysResponse]>`

Usage:
Expand All @@ -1560,6 +1586,11 @@ async def list_api_keys_all(
"application_id": application_id,
"user_id": user_id,
"editable": editable,
"expirable": expirable,
"access_key": access_key,
"description": description,
"bearer_id": bearer_id,
"bearer_type": bearer_type,
},
)

Expand Down
36 changes: 36 additions & 0 deletions scaleway-async/scaleway_async/iam/v1alpha1/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,15 @@
from typing import List, Optional


class ListAPIKeysRequestBearerType(str, Enum):
UNKNOWN_BEARER_TYPE = "unknown_bearer_type"
USER = "user"
APPLICATION = "application"

def __str__(self) -> str:
return str(self.value)


class ListAPIKeysRequestOrderBy(str, Enum):
CREATED_AT_ASC = "created_at_asc"
CREATED_AT_DESC = "created_at_desc"
Expand Down Expand Up @@ -1341,20 +1350,47 @@ class ListAPIKeysRequest:
ID of an application bearer.

One-of ('bearer'): at most one of 'application_id', 'user_id' could be set.
:deprecated
"""

user_id: Optional[str]
"""
ID of a user bearer.

One-of ('bearer'): at most one of 'application_id', 'user_id' could be set.
:deprecated
"""

editable: Optional[bool]
"""
Filter out editable API keys or not
"""

expirable: Optional[bool]
"""
Filter out expirable API keys or not
"""

access_key: Optional[str]
"""
Filter out by access key
"""

description: Optional[str]
"""
Filter out by description
"""

bearer_id: Optional[str]
"""
Filter out by bearer ID
"""

bearer_type: Optional[ListAPIKeysRequestBearerType]
"""
Filter out by type of bearer
"""


@dataclass
class CreateAPIKeyRequest:
Expand Down
2 changes: 2 additions & 0 deletions scaleway/scaleway/iam/v1alpha1/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# This file was automatically generated. DO NOT EDIT.
# If you have any remark or suggestion do not hesitate to open an issue.
from .types import ListAPIKeysRequestBearerType
from .types import ListAPIKeysRequestOrderBy
from .types import ListApplicationsRequestOrderBy
from .types import ListGroupsRequestOrderBy
Expand Down Expand Up @@ -31,6 +32,7 @@
from .api import IamV1Alpha1API

__all__ = [
"ListAPIKeysRequestBearerType",
"ListAPIKeysRequestOrderBy",
"ListApplicationsRequestOrderBy",
"ListGroupsRequestOrderBy",
Expand Down
31 changes: 31 additions & 0 deletions scaleway/scaleway/iam/v1alpha1/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
validate_path_param,
)
from .types import (
ListAPIKeysRequestBearerType,
ListAPIKeysRequestOrderBy,
ListApplicationsRequestOrderBy,
ListGroupsRequestOrderBy,
Expand Down Expand Up @@ -1472,6 +1473,11 @@ def list_api_keys(
application_id: Optional[str] = None,
user_id: Optional[str] = None,
editable: Optional[bool] = None,
expirable: Optional[bool] = None,
access_key: Optional[str] = None,
description: Optional[str] = None,
bearer_id: Optional[str] = None,
bearer_type: ListAPIKeysRequestBearerType = ListAPIKeysRequestBearerType.UNKNOWN_BEARER_TYPE,
) -> ListAPIKeysResponse:
"""
List API keys
Expand All @@ -1486,6 +1492,11 @@ def list_api_keys(

One-of ('bearer'): at most one of 'application_id', 'user_id' could be set.
:param editable: Filter out editable API keys or not
:param expirable: Filter out expirable API keys or not
:param access_key: Filter out by access key
:param description: Filter out by description
:param bearer_id: Filter out by bearer ID
:param bearer_type: Filter out by type of bearer
:return: :class:`ListAPIKeysResponse <ListAPIKeysResponse>`

Usage:
Expand All @@ -1498,7 +1509,12 @@ def list_api_keys(
"GET",
f"/iam/v1alpha1/api-keys",
params={
"access_key": access_key,
"bearer_id": bearer_id,
"bearer_type": bearer_type,
"description": description,
"editable": editable,
"expirable": expirable,
"order_by": order_by,
"organization_id": organization_id
or self.client.default_organization_id,
Expand Down Expand Up @@ -1526,6 +1542,11 @@ def list_api_keys_all(
application_id: Optional[str] = None,
user_id: Optional[str] = None,
editable: Optional[bool] = None,
expirable: Optional[bool] = None,
access_key: Optional[str] = None,
description: Optional[str] = None,
bearer_id: Optional[str] = None,
bearer_type: Optional[ListAPIKeysRequestBearerType] = None,
) -> List[APIKey]:
"""
List API keys
Expand All @@ -1540,6 +1561,11 @@ def list_api_keys_all(

One-of ('bearer'): at most one of 'application_id', 'user_id' could be set.
:param editable: Filter out editable API keys or not
:param expirable: Filter out expirable API keys or not
:param access_key: Filter out by access key
:param description: Filter out by description
:param bearer_id: Filter out by bearer ID
:param bearer_type: Filter out by type of bearer
:return: :class:`List[ListAPIKeysResponse] <List[ListAPIKeysResponse]>`

Usage:
Expand All @@ -1560,6 +1586,11 @@ def list_api_keys_all(
"application_id": application_id,
"user_id": user_id,
"editable": editable,
"expirable": expirable,
"access_key": access_key,
"description": description,
"bearer_id": bearer_id,
"bearer_type": bearer_type,
},
)

Expand Down
36 changes: 36 additions & 0 deletions scaleway/scaleway/iam/v1alpha1/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,15 @@
from typing import List, Optional


class ListAPIKeysRequestBearerType(str, Enum):
UNKNOWN_BEARER_TYPE = "unknown_bearer_type"
USER = "user"
APPLICATION = "application"

def __str__(self) -> str:
return str(self.value)


class ListAPIKeysRequestOrderBy(str, Enum):
CREATED_AT_ASC = "created_at_asc"
CREATED_AT_DESC = "created_at_desc"
Expand Down Expand Up @@ -1341,20 +1350,47 @@ class ListAPIKeysRequest:
ID of an application bearer.

One-of ('bearer'): at most one of 'application_id', 'user_id' could be set.
:deprecated
"""

user_id: Optional[str]
"""
ID of a user bearer.

One-of ('bearer'): at most one of 'application_id', 'user_id' could be set.
:deprecated
"""

editable: Optional[bool]
"""
Filter out editable API keys or not
"""

expirable: Optional[bool]
"""
Filter out expirable API keys or not
"""

access_key: Optional[str]
"""
Filter out by access key
"""

description: Optional[str]
"""
Filter out by description
"""

bearer_id: Optional[str]
"""
Filter out by bearer ID
"""

bearer_type: Optional[ListAPIKeysRequestBearerType]
"""
Filter out by type of bearer
"""


@dataclass
class CreateAPIKeyRequest:
Expand Down