scaleway_async.audit_trail.v1alpha1 package
Submodules
scaleway_async.audit_trail.v1alpha1.api module
- class scaleway_async.audit_trail.v1alpha1.api.AuditTrailV1Alpha1API(client: Client, *, bypass_validation: bool = False)
Bases:
API
This API allows you to ensure accountability and security by recording events and changes performed within your Scaleway Organization.
- async list_events(*, region: Optional[str] = None, project_id: Optional[str] = None, organization_id: Optional[str] = None, resource_type: Optional[ResourceType] = None, method_name: Optional[str] = None, status: Optional[int] = None, recorded_after: Optional[datetime] = None, recorded_before: Optional[datetime] = None, order_by: Optional[ListEventsRequestOrderBy] = None, page_size: Optional[int] = None, page_token: Optional[str] = None, product_name: Optional[str] = None, service_name: Optional[str] = None) ListEventsResponse
List events. Retrieve the list of Audit Trail events for a Scaleway Organization and/or Project. You must specify the organization_id and optionally, the project_id. :param region: Region to target. If none is passed will use default region from the config. :param project_id: (Optional) ID of the Project containing the Audit Trail events. :param organization_id: ID of the Organization containing the Audit Trail events. :param resource_type: (Optional) Returns a paginated list of Scaleway resources’ features. :param method_name: (Optional) Name of the method of the API call performed. :param status: (Optional) HTTP status code of the request. Returns either 200 if the request was successful or 403 if the permission was denied. :param recorded_after: (Optional) The recorded_after parameter defines the earliest timestamp from which Audit Trail events are retrieved. Returns one hour ago by default. :param recorded_before: (Optional) The recorded_before parameter defines the latest timestamp up to which Audit Trail events are retrieved. Returns now by default. :param order_by: :param page_size: :param page_token: :param product_name: (Optional) Name of the Scaleway resource in a hyphenated format. :param service_name: (Optional) Name of the service of the API call performed. :return:
ListEventsResponse
Usage:
result = await api.list_events()
- async list_products(*, region: Optional[str] = None, organization_id: Optional[str] = None) ListProductsResponse
Retrieve the list of Scaleway resources for which you have Audit Trail events. :param region: Region to target. If none is passed will use default region from the config. :param organization_id: ID of the Organization containing the Audit Trail events. :return:
ListProductsResponse
Usage:
result = await api.list_products()
scaleway_async.audit_trail.v1alpha1.marshalling module
- scaleway_async.audit_trail.v1alpha1.marshalling.unmarshal_EventPrincipal(data: Any) EventPrincipal
- scaleway_async.audit_trail.v1alpha1.marshalling.unmarshal_KeyManagerKeyInfo(data: Any) KeyManagerKeyInfo
- scaleway_async.audit_trail.v1alpha1.marshalling.unmarshal_KubernetesACLInfo(data: Any) KubernetesACLInfo
- scaleway_async.audit_trail.v1alpha1.marshalling.unmarshal_KubernetesClusterInfo(data: Any) KubernetesClusterInfo
- scaleway_async.audit_trail.v1alpha1.marshalling.unmarshal_KubernetesNodeInfo(data: Any) KubernetesNodeInfo
- scaleway_async.audit_trail.v1alpha1.marshalling.unmarshal_KubernetesPoolInfo(data: Any) KubernetesPoolInfo
- scaleway_async.audit_trail.v1alpha1.marshalling.unmarshal_ListEventsResponse(data: Any) ListEventsResponse
- scaleway_async.audit_trail.v1alpha1.marshalling.unmarshal_ListProductsResponse(data: Any) ListProductsResponse
- scaleway_async.audit_trail.v1alpha1.marshalling.unmarshal_ProductService(data: Any) ProductService
- scaleway_async.audit_trail.v1alpha1.marshalling.unmarshal_SecretManagerSecretInfo(data: Any) SecretManagerSecretInfo
- scaleway_async.audit_trail.v1alpha1.marshalling.unmarshal_SecretManagerSecretVersionInfo(data: Any) SecretManagerSecretVersionInfo
scaleway_async.audit_trail.v1alpha1.types module
- class scaleway_async.audit_trail.v1alpha1.types.Event(id: 'str', locality: 'str', organization_id: 'str', source_ip: 'str', recorded_at: 'Optional[datetime]', principal: 'Optional[EventPrincipal]', project_id: 'Optional[str]', user_agent: 'Optional[str]', product_name: 'str', service_name: 'str', method_name: 'str', resources: 'List[Resource]', request_id: 'str', status_code: 'int', resource: 'Optional[Resource]', request_body: 'Optional[Dict[str, Any]]')
Bases:
object
- id: str
ID of the event.
- locality: str
Locality of the resource attached to the event.
- method_name: str
API method called to trigger the event.
- organization_id: str
Organization ID containing the event.
- principal: Optional[EventPrincipal]
User or IAM application at the origin of the event.
- product_name: str
Product name of the resource attached to the event.
- project_id: Optional[str]
(Optional) Project of the resource attached to the event.
- recorded_at: Optional[datetime]
Timestamp of the event.
- request_body: Optional[Dict[str, Any]]
Request at the origin of the event.
- request_id: str
Unique identifier of the request at the origin of the event.
- service_name: str
API name called to trigger the event.
- source_ip: str
IP address at the origin of the event.
- status_code: int
HTTP status code resulting of the API call.
- user_agent: Optional[str]
User Agent at the origin of the event.
- class scaleway_async.audit_trail.v1alpha1.types.KeyManagerKeyInfo
Bases:
object
- class scaleway_async.audit_trail.v1alpha1.types.KubernetesACLInfo
Bases:
object
- class scaleway_async.audit_trail.v1alpha1.types.KubernetesClusterInfo
Bases:
object
- class scaleway_async.audit_trail.v1alpha1.types.KubernetesNodeInfo(id: 'str', name: 'str')
Bases:
object
- id: str
- name: str
- class scaleway_async.audit_trail.v1alpha1.types.KubernetesPoolInfo(id: 'str', name: 'str')
Bases:
object
- id: str
- name: str
- class scaleway_async.audit_trail.v1alpha1.types.ListEventsRequest(region: 'Optional[ScwRegion]', project_id: 'Optional[str]', organization_id: 'Optional[str]', resource_type: 'Optional[ResourceType]', method_name: 'Optional[str]', status: 'Optional[int]', recorded_after: 'Optional[datetime]', recorded_before: 'Optional[datetime]', order_by: 'Optional[ListEventsRequestOrderBy]', page_size: 'Optional[int]', page_token: 'Optional[str]', product_name: 'Optional[str]', service_name: 'Optional[str]')
Bases:
object
- method_name: Optional[str]
(Optional) Name of the method of the API call performed.
- order_by: Optional[ListEventsRequestOrderBy]
- organization_id: Optional[str]
ID of the Organization containing the Audit Trail events.
- page_size: Optional[int]
- page_token: Optional[str]
- product_name: Optional[str]
(Optional) Name of the Scaleway resource in a hyphenated format.
- project_id: Optional[str]
(Optional) ID of the Project containing the Audit Trail events.
- recorded_after: Optional[datetime]
(Optional) The recorded_after parameter defines the earliest timestamp from which Audit Trail events are retrieved. Returns one hour ago by default.
- recorded_before: Optional[datetime]
(Optional) The recorded_before parameter defines the latest timestamp up to which Audit Trail events are retrieved. Returns now by default.
- region: Optional[str]
Region to target. If none is passed will use default region from the config.
- resource_type: Optional[ResourceType]
(Optional) Returns a paginated list of Scaleway resources’ features.
- service_name: Optional[str]
(Optional) Name of the service of the API call performed.
- status: Optional[int]
(Optional) HTTP status code of the request. Returns either 200 if the request was successful or 403 if the permission was denied.
- class scaleway_async.audit_trail.v1alpha1.types.ListEventsRequestOrderBy(value: str, names: Optional[Any] = None, *args: Any, **kwargs: Any)
Bases:
str
,Enum
An enumeration.
- RECORDED_AT_ASC = 'recorded_at_asc'
- RECORDED_AT_DESC = 'recorded_at_desc'
- class scaleway_async.audit_trail.v1alpha1.types.ListEventsResponse(events: 'List[Event]', next_page_token: 'Optional[str]')
Bases:
object
- next_page_token: Optional[str]
Page token to use in following calls to keep listing.
- class scaleway_async.audit_trail.v1alpha1.types.ListProductsRequest(region: 'Optional[ScwRegion]', organization_id: 'Optional[str]')
Bases:
object
- organization_id: Optional[str]
ID of the Organization containing the Audit Trail events.
- region: Optional[str]
Region to target. If none is passed will use default region from the config.
- class scaleway_async.audit_trail.v1alpha1.types.ListProductsResponse(products: 'List[Product]', total_count: 'int')
Bases:
object
- total_count: int
Number of integrated products.
- class scaleway_async.audit_trail.v1alpha1.types.Product(title: 'str', name: 'str', services: 'List[ProductService]')
Bases:
object
- name: str
Product name.
- services: List[ProductService]
Specifies the API versions of the products integrated with Audit Trail. Each version defines the methods logged by Audit Trail.
- title: str
Product title.
- class scaleway_async.audit_trail.v1alpha1.types.ProductService(name: 'str', methods: 'List[str]')
Bases:
object
- methods: List[str]
- name: str
- class scaleway_async.audit_trail.v1alpha1.types.Resource(id: 'str', type_: 'ResourceType', created_at: 'Optional[datetime]', updated_at: 'Optional[datetime]', deleted_at: 'Optional[datetime]', name: 'Optional[str]', secm_secret_info: 'Optional[SecretManagerSecretInfo]', secm_secret_version_info: 'Optional[SecretManagerSecretVersionInfo]', kube_cluster_info: 'Optional[KubernetesClusterInfo]', kube_pool_info: 'Optional[KubernetesPoolInfo]', kube_node_info: 'Optional[KubernetesNodeInfo]', kube_acl_info: 'Optional[KubernetesACLInfo]', keym_key_info: 'Optional[KeyManagerKeyInfo]', secret_manager_secret_info: 'Optional[SecretManagerSecretInfo]', secret_manager_version_info: 'Optional[SecretManagerSecretVersionInfo]', key_manager_key_info: 'Optional[KeyManagerKeyInfo]')
Bases:
object
- created_at: Optional[datetime]
- deleted_at: Optional[datetime]
- id: str
- key_manager_key_info: Optional[KeyManagerKeyInfo]
- keym_key_info: Optional[KeyManagerKeyInfo]
- kube_acl_info: Optional[KubernetesACLInfo]
- kube_cluster_info: Optional[KubernetesClusterInfo]
- kube_node_info: Optional[KubernetesNodeInfo]
- kube_pool_info: Optional[KubernetesPoolInfo]
- name: Optional[str]
- secm_secret_info: Optional[SecretManagerSecretInfo]
- secm_secret_version_info: Optional[SecretManagerSecretVersionInfo]
- secret_manager_secret_info: Optional[SecretManagerSecretInfo]
- secret_manager_version_info: Optional[SecretManagerSecretVersionInfo]
- type_: ResourceType
- updated_at: Optional[datetime]
- class scaleway_async.audit_trail.v1alpha1.types.ResourceType(value: str, names: Optional[Any] = None, *args: Any, **kwargs: Any)
Bases:
str
,Enum
An enumeration.
- IAM_API_KEY = 'iam_api_key'
- IAM_APPLICATION = 'iam_application'
- IAM_GROUP = 'iam_group'
- IAM_POLICY = 'iam_policy'
- IAM_RULE = 'iam_rule'
- IAM_SSH_KEY = 'iam_ssh_key'
- IAM_USER = 'iam_user'
- KEYM_KEY = 'keym_key'
- KEY_MANAGER_KEY = 'key_manager_key'
- KUBE_ACL = 'kube_acl'
- KUBE_CLUSTER = 'kube_cluster'
- KUBE_NODE = 'kube_node'
- KUBE_POOL = 'kube_pool'
- SECM_SECRET = 'secm_secret'
- SECM_SECRET_VERSION = 'secm_secret_version'
- SECRET_MANAGER_SECRET = 'secret_manager_secret'
- SECRET_MANAGER_VERSION = 'secret_manager_version'
- UNKNOWN_TYPE = 'unknown_type'
Module contents
- class scaleway_async.audit_trail.v1alpha1.AuditTrailV1Alpha1API(client: Client, *, bypass_validation: bool = False)
Bases:
API
This API allows you to ensure accountability and security by recording events and changes performed within your Scaleway Organization.
- async list_events(*, region: Optional[str] = None, project_id: Optional[str] = None, organization_id: Optional[str] = None, resource_type: Optional[ResourceType] = None, method_name: Optional[str] = None, status: Optional[int] = None, recorded_after: Optional[datetime] = None, recorded_before: Optional[datetime] = None, order_by: Optional[ListEventsRequestOrderBy] = None, page_size: Optional[int] = None, page_token: Optional[str] = None, product_name: Optional[str] = None, service_name: Optional[str] = None) ListEventsResponse
List events. Retrieve the list of Audit Trail events for a Scaleway Organization and/or Project. You must specify the organization_id and optionally, the project_id. :param region: Region to target. If none is passed will use default region from the config. :param project_id: (Optional) ID of the Project containing the Audit Trail events. :param organization_id: ID of the Organization containing the Audit Trail events. :param resource_type: (Optional) Returns a paginated list of Scaleway resources’ features. :param method_name: (Optional) Name of the method of the API call performed. :param status: (Optional) HTTP status code of the request. Returns either 200 if the request was successful or 403 if the permission was denied. :param recorded_after: (Optional) The recorded_after parameter defines the earliest timestamp from which Audit Trail events are retrieved. Returns one hour ago by default. :param recorded_before: (Optional) The recorded_before parameter defines the latest timestamp up to which Audit Trail events are retrieved. Returns now by default. :param order_by: :param page_size: :param page_token: :param product_name: (Optional) Name of the Scaleway resource in a hyphenated format. :param service_name: (Optional) Name of the service of the API call performed. :return:
ListEventsResponse
Usage:
result = await api.list_events()
- async list_products(*, region: Optional[str] = None, organization_id: Optional[str] = None) ListProductsResponse
Retrieve the list of Scaleway resources for which you have Audit Trail events. :param region: Region to target. If none is passed will use default region from the config. :param organization_id: ID of the Organization containing the Audit Trail events. :return:
ListProductsResponse
Usage:
result = await api.list_products()
- class scaleway_async.audit_trail.v1alpha1.Event(id: 'str', locality: 'str', organization_id: 'str', source_ip: 'str', recorded_at: 'Optional[datetime]', principal: 'Optional[EventPrincipal]', project_id: 'Optional[str]', user_agent: 'Optional[str]', product_name: 'str', service_name: 'str', method_name: 'str', resources: 'List[Resource]', request_id: 'str', status_code: 'int', resource: 'Optional[Resource]', request_body: 'Optional[Dict[str, Any]]')
Bases:
object
- id: str
ID of the event.
- locality: str
Locality of the resource attached to the event.
- method_name: str
API method called to trigger the event.
- organization_id: str
Organization ID containing the event.
- principal: Optional[EventPrincipal]
User or IAM application at the origin of the event.
- product_name: str
Product name of the resource attached to the event.
- project_id: Optional[str]
(Optional) Project of the resource attached to the event.
- recorded_at: Optional[datetime]
Timestamp of the event.
- request_body: Optional[Dict[str, Any]]
Request at the origin of the event.
- request_id: str
Unique identifier of the request at the origin of the event.
- service_name: str
API name called to trigger the event.
- source_ip: str
IP address at the origin of the event.
- status_code: int
HTTP status code resulting of the API call.
- user_agent: Optional[str]
User Agent at the origin of the event.
- class scaleway_async.audit_trail.v1alpha1.KeyManagerKeyInfo
Bases:
object
- class scaleway_async.audit_trail.v1alpha1.KubernetesACLInfo
Bases:
object
- class scaleway_async.audit_trail.v1alpha1.KubernetesClusterInfo
Bases:
object
- class scaleway_async.audit_trail.v1alpha1.KubernetesNodeInfo(id: 'str', name: 'str')
Bases:
object
- id: str
- name: str
- class scaleway_async.audit_trail.v1alpha1.KubernetesPoolInfo(id: 'str', name: 'str')
Bases:
object
- id: str
- name: str
- class scaleway_async.audit_trail.v1alpha1.ListEventsRequest(region: 'Optional[ScwRegion]', project_id: 'Optional[str]', organization_id: 'Optional[str]', resource_type: 'Optional[ResourceType]', method_name: 'Optional[str]', status: 'Optional[int]', recorded_after: 'Optional[datetime]', recorded_before: 'Optional[datetime]', order_by: 'Optional[ListEventsRequestOrderBy]', page_size: 'Optional[int]', page_token: 'Optional[str]', product_name: 'Optional[str]', service_name: 'Optional[str]')
Bases:
object
- method_name: Optional[str]
(Optional) Name of the method of the API call performed.
- order_by: Optional[ListEventsRequestOrderBy]
- organization_id: Optional[str]
ID of the Organization containing the Audit Trail events.
- page_size: Optional[int]
- page_token: Optional[str]
- product_name: Optional[str]
(Optional) Name of the Scaleway resource in a hyphenated format.
- project_id: Optional[str]
(Optional) ID of the Project containing the Audit Trail events.
- recorded_after: Optional[datetime]
(Optional) The recorded_after parameter defines the earliest timestamp from which Audit Trail events are retrieved. Returns one hour ago by default.
- recorded_before: Optional[datetime]
(Optional) The recorded_before parameter defines the latest timestamp up to which Audit Trail events are retrieved. Returns now by default.
- region: Optional[str]
Region to target. If none is passed will use default region from the config.
- resource_type: Optional[ResourceType]
(Optional) Returns a paginated list of Scaleway resources’ features.
- service_name: Optional[str]
(Optional) Name of the service of the API call performed.
- status: Optional[int]
(Optional) HTTP status code of the request. Returns either 200 if the request was successful or 403 if the permission was denied.
- class scaleway_async.audit_trail.v1alpha1.ListEventsRequestOrderBy(value: str, names: Optional[Any] = None, *args: Any, **kwargs: Any)
Bases:
str
,Enum
An enumeration.
- RECORDED_AT_ASC = 'recorded_at_asc'
- RECORDED_AT_DESC = 'recorded_at_desc'
- class scaleway_async.audit_trail.v1alpha1.ListEventsResponse(events: 'List[Event]', next_page_token: 'Optional[str]')
Bases:
object
- next_page_token: Optional[str]
Page token to use in following calls to keep listing.
- class scaleway_async.audit_trail.v1alpha1.ListProductsRequest(region: 'Optional[ScwRegion]', organization_id: 'Optional[str]')
Bases:
object
- organization_id: Optional[str]
ID of the Organization containing the Audit Trail events.
- region: Optional[str]
Region to target. If none is passed will use default region from the config.
- class scaleway_async.audit_trail.v1alpha1.ListProductsResponse(products: 'List[Product]', total_count: 'int')
Bases:
object
- total_count: int
Number of integrated products.
- class scaleway_async.audit_trail.v1alpha1.Product(title: 'str', name: 'str', services: 'List[ProductService]')
Bases:
object
- name: str
Product name.
- services: List[ProductService]
Specifies the API versions of the products integrated with Audit Trail. Each version defines the methods logged by Audit Trail.
- title: str
Product title.
- class scaleway_async.audit_trail.v1alpha1.ProductService(name: 'str', methods: 'List[str]')
Bases:
object
- methods: List[str]
- name: str
- class scaleway_async.audit_trail.v1alpha1.Resource(id: 'str', type_: 'ResourceType', created_at: 'Optional[datetime]', updated_at: 'Optional[datetime]', deleted_at: 'Optional[datetime]', name: 'Optional[str]', secm_secret_info: 'Optional[SecretManagerSecretInfo]', secm_secret_version_info: 'Optional[SecretManagerSecretVersionInfo]', kube_cluster_info: 'Optional[KubernetesClusterInfo]', kube_pool_info: 'Optional[KubernetesPoolInfo]', kube_node_info: 'Optional[KubernetesNodeInfo]', kube_acl_info: 'Optional[KubernetesACLInfo]', keym_key_info: 'Optional[KeyManagerKeyInfo]', secret_manager_secret_info: 'Optional[SecretManagerSecretInfo]', secret_manager_version_info: 'Optional[SecretManagerSecretVersionInfo]', key_manager_key_info: 'Optional[KeyManagerKeyInfo]')
Bases:
object
- created_at: Optional[datetime]
- deleted_at: Optional[datetime]
- id: str
- key_manager_key_info: Optional[KeyManagerKeyInfo]
- keym_key_info: Optional[KeyManagerKeyInfo]
- kube_acl_info: Optional[KubernetesACLInfo]
- kube_cluster_info: Optional[KubernetesClusterInfo]
- kube_node_info: Optional[KubernetesNodeInfo]
- kube_pool_info: Optional[KubernetesPoolInfo]
- name: Optional[str]
- secm_secret_info: Optional[SecretManagerSecretInfo]
- secm_secret_version_info: Optional[SecretManagerSecretVersionInfo]
- secret_manager_secret_info: Optional[SecretManagerSecretInfo]
- secret_manager_version_info: Optional[SecretManagerSecretVersionInfo]
- type_: ResourceType
- updated_at: Optional[datetime]
- class scaleway_async.audit_trail.v1alpha1.ResourceType(value: str, names: Optional[Any] = None, *args: Any, **kwargs: Any)
Bases:
str
,Enum
An enumeration.
- IAM_API_KEY = 'iam_api_key'
- IAM_APPLICATION = 'iam_application'
- IAM_GROUP = 'iam_group'
- IAM_POLICY = 'iam_policy'
- IAM_RULE = 'iam_rule'
- IAM_SSH_KEY = 'iam_ssh_key'
- IAM_USER = 'iam_user'
- KEYM_KEY = 'keym_key'
- KEY_MANAGER_KEY = 'key_manager_key'
- KUBE_ACL = 'kube_acl'
- KUBE_CLUSTER = 'kube_cluster'
- KUBE_NODE = 'kube_node'
- KUBE_POOL = 'kube_pool'
- SECM_SECRET = 'secm_secret'
- SECM_SECRET_VERSION = 'secm_secret_version'
- SECRET_MANAGER_SECRET = 'secret_manager_secret'
- SECRET_MANAGER_VERSION = 'secret_manager_version'
- UNKNOWN_TYPE = 'unknown_type'