Skip to content
Merged
Show file tree
Hide file tree
Changes from 6 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
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
- **Version**: Minimal version is now python 3.9
- `authorization`: [v0.3.0](services/authorization/CHANGELOG.md#v030)
- **Version**: Minimal version is now python 3.9
- `auditlog`: [v0.1.0](services/auditlog/CHANGELOG.md#v010)
- **New**: STACKIT Audit Log module for retrieving recorded actions and system changes. Download audit log entries for folders, organizations, and projects with time range filtering, pagination, and configurable result limits.
- `cdn`:
- [v1.5.0](services/cdn/CHANGELOG.md#v150)
- **Feature:** Added new filter functions `DataCenterRegion`, `RequestCountryCode`, `StatusCode` and `CacheHit`
Expand All @@ -34,6 +36,8 @@
- `intake`: [v0.1.0](services/intake/CHANGELOG.md#v010)
- **New**: STACKIT Intake module can be used to manage the STACKIT Intake. Manage your `IntakeRunners`, `Intakes` and `IntakeUsers`
- `kms`:
- [v0.2.1](services/kms/CHANGELOG.md#v021)
- **Improvement:** Improved error handling for multiple API methods including `delete_key`, `delete_key_ring`, `delete_wrapping_key`, `destroy_version`, `disable_version`, `enable_version`, `restore_key`, and `restore_version`
- [v0.2.0](services/kms/CHANGELOG.md#v020)
- **Breaking Change:** Change return type from `Key` to `Version` for `import_key()` and `rotate_key()` methods
- **Internal:** Add HTTP 409 (Conflict) error handling to API methods
Expand Down
3 changes: 3 additions & 0 deletions services/auditlog/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
## v0.1.0

- **New**: STACKIT Audit Log module for retrieving recorded actions and system changes. Download audit log entries for folders, organizations, and projects with time range filtering, pagination, and configurable result limits.
35 changes: 35 additions & 0 deletions services/auditlog/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# stackit.auditlog
API Endpoints to retrieve recorded actions and resulting changes in the system.

### Documentation
The user documentation with explanations how to use the api can be found
[here](https://docs.stackit.cloud/stackit/en/retrieve-audit-log-per-api-request-134415907.html).

### Audit Logging
Changes on organizations, folders and projects and respective cloud resources are logged and collected in the audit
log.

### API Constraints
The audit log API allows to download messages from the last 90 days. The maximum duration that can be queried at
once is 24 hours. Requests are rate limited - the current maximum is 60 requests per minute.

For more information, please visit [https://support.stackit.cloud/servicedesk](https://support.stackit.cloud/servicedesk)

This package is part of the STACKIT Python SDK. For additional information, please visit the [GitHub repository](https://github.com/stackitcloud/stackit-sdk-python) of the SDK.


## Installation & Usage
### pip install

```sh
pip install stackit-auditlog
```

Then import the package:
```python
import stackit.auditlog
```

## Getting Started

[Examples](https://github.com/stackitcloud/stackit-sdk-python/tree/main/examples) for the usage of the package can be found in the [GitHub repository](https://github.com/stackitcloud/stackit-sdk-python) of the SDK.
1,412 changes: 1,412 additions & 0 deletions services/auditlog/poetry.lock

Large diffs are not rendered by default.

99 changes: 99 additions & 0 deletions services/auditlog/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
[project]
name = "stackit-auditlog"

[tool.poetry]
name = "stackit-auditlog"
version = "v0.1.0"
authors = [
"STACKIT Developer Tools <[email protected]>",
]
description = "Audit Log API"
readme = "README.md"
#license = "NoLicense"
classifiers = [
"Programming Language :: Python :: 3",
"License :: OSI Approved :: Apache Software License",
"Operating System :: OS Independent",
]
packages = [
{ include = "stackit", from="src" }
]

[tool.poetry.dependencies]
python = "^3.9"
stackit-core = ">=0.0.1a"
requests = ">=2.32.3"
pydantic = ">=2.9.2"
python-dateutil = ">=2.9.0.post0"

[tool.poetry.group.dev.dependencies]
black = ">=24.8.0"
pytest = ">=8.3.3"
flake8 = [
{ version= ">=5.0.3", python="<3.12"},
{ version= ">=6.0.1", python=">=3.12"}
]
flake8-black = ">=0.3.6"
flake8-pyproject = ">=1.2.3"
autoimport = ">=1.6.1"
flake8-eol = ">=0.0.8"
flake8-eradicate = ">=1.5.0"
flake8-bandit = ">=4.1.1"
flake8-bugbear = ">=23.1.14"
flake8-quotes = ">=3.4.0"
isort = ">=5.13.2"

[project.urls]
Homepage = "https://github.com/stackitcloud/stackit-sdk-python"
Issues = "https://github.com/stackitcloud/stackit-sdk-python/issues"

[build-system]
requires = ["setuptools", "poetry-core"]
build-backend = "poetry.core.masonry.api"

[tool.pytest.ini_options]
pythonpath = [
"src"
]
testpaths = [
"tests"
]

[tool.black]
line-length = 120
exclude = """
/(
.eggs
| .git
| .hg
| .mypy_cache
| .nox
| .pants.d
| .tox
| .venv
| _build
| buck-out
| build
| dist
| node_modules
| venv
)/
"""

[tool.isort]
profile = 'black'

[tool.flake8]
exclude= [".eggs", ".git", ".hg", ".mypy_cache", ".tox", ".venv", ".devcontainer", "venv", "_build", "buck-out", "build", "dist"]
statistics = true
show-source = false
max-line-length = 120
# E203,W503 and E704 are incompatible with the formatter black
# W291 needs to be disabled because some doc-strings get generated with trailing whitespace but black won't re-format comments
ignore = ["E203", "W503", "E704", "W291"]
inline-quotes = '"'
docstring-quotes = '"""'
multiline-quotes = '"""'
ban-relative-imports = true
# Exclude generated code
extend-exclude = [ "src/stackit/*/models/*", "src/stackit/*/api/*", "src/stackit/*/*.py" ]
81 changes: 81 additions & 0 deletions services/auditlog/src/stackit/auditlog/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
# coding: utf-8

# flake8: noqa

"""
Audit Log API

API Endpoints to retrieve recorded actions and resulting changes in the system. ### Documentation The user documentation with explanations how to use the api can be found [here](https://docs.stackit.cloud/stackit/en/retrieve-audit-log-per-api-request-134415907.html). ### Audit Logging Changes on organizations, folders and projects and respective cloud resources are logged and collected in the audit log. ### API Constraints The audit log API allows to download messages from the last 90 days. The maximum duration that can be queried at once is 24 hours. Requests are rate limited - the current maximum is 60 requests per minute.

The version of the OpenAPI document: 2.0
Generated by OpenAPI Generator (https://openapi-generator.tech)

Do not edit the class manually.
""" # noqa: E501


__version__ = "1.0.0"

# Define package exports
__all__ = [
"DefaultApi",
"ApiResponse",
"ApiClient",
"HostConfiguration",
"OpenApiException",
"ApiTypeError",
"ApiValueError",
"ApiKeyError",
"ApiAttributeError",
"ApiException",
"AuditLogEntryContextResponse",
"AuditLogEntryInitiatorResponse",
"AuditLogEntryRequestResponse",
"AuditLogEntryResponse",
"AuditLogEntryServiceAccountDelegationInfoResponse",
"ErrorResponse",
"GatewayErrorResponse",
"ListAuditLogEntriesResponse",
"ServiceAccountDelegationInfoPrincipalResponse",
]

# import apis into sdk package
from stackit.auditlog.api.default_api import DefaultApi as DefaultApi
from stackit.auditlog.api_client import ApiClient as ApiClient

# import ApiClient
from stackit.auditlog.api_response import ApiResponse as ApiResponse
from stackit.auditlog.configuration import HostConfiguration as HostConfiguration
from stackit.auditlog.exceptions import ApiAttributeError as ApiAttributeError
from stackit.auditlog.exceptions import ApiException as ApiException
from stackit.auditlog.exceptions import ApiKeyError as ApiKeyError
from stackit.auditlog.exceptions import ApiTypeError as ApiTypeError
from stackit.auditlog.exceptions import ApiValueError as ApiValueError
from stackit.auditlog.exceptions import OpenApiException as OpenApiException

# import models into sdk package
from stackit.auditlog.models.audit_log_entry_context_response import (
AuditLogEntryContextResponse as AuditLogEntryContextResponse,
)
from stackit.auditlog.models.audit_log_entry_initiator_response import (
AuditLogEntryInitiatorResponse as AuditLogEntryInitiatorResponse,
)
from stackit.auditlog.models.audit_log_entry_request_response import (
AuditLogEntryRequestResponse as AuditLogEntryRequestResponse,
)
from stackit.auditlog.models.audit_log_entry_response import (
AuditLogEntryResponse as AuditLogEntryResponse,
)
from stackit.auditlog.models.audit_log_entry_service_account_delegation_info_response import (
AuditLogEntryServiceAccountDelegationInfoResponse as AuditLogEntryServiceAccountDelegationInfoResponse,
)
from stackit.auditlog.models.error_response import ErrorResponse as ErrorResponse
from stackit.auditlog.models.gateway_error_response import (
GatewayErrorResponse as GatewayErrorResponse,
)
from stackit.auditlog.models.list_audit_log_entries_response import (
ListAuditLogEntriesResponse as ListAuditLogEntriesResponse,
)
from stackit.auditlog.models.service_account_delegation_info_principal_response import (
ServiceAccountDelegationInfoPrincipalResponse as ServiceAccountDelegationInfoPrincipalResponse,
)
4 changes: 4 additions & 0 deletions services/auditlog/src/stackit/auditlog/api/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# flake8: noqa

# import apis into api package
from stackit.auditlog.api.default_api import DefaultApi
Loading
Loading