pyomsdk 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- pyomsdk-0.1.0/LICENSE +21 -0
- pyomsdk-0.1.0/PKG-INFO +37 -0
- pyomsdk-0.1.0/README.md +40 -0
- pyomsdk-0.1.0/pyproject.toml +56 -0
- pyomsdk-0.1.0/setup.cfg +4 -0
- pyomsdk-0.1.0/src/pyomsdk/__init__.py +3 -0
- pyomsdk-0.1.0/src/pyomsdk/ops_manager_client.py +317 -0
- pyomsdk-0.1.0/src/pyomsdk/resources/__init__.py +119 -0
- pyomsdk-0.1.0/src/pyomsdk/resources/access_list_resource.py +262 -0
- pyomsdk-0.1.0/src/pyomsdk/resources/agents_resource.py +455 -0
- pyomsdk-0.1.0/src/pyomsdk/resources/alert_configurations_resource.py +1705 -0
- pyomsdk-0.1.0/src/pyomsdk/resources/alerts_resource.py +239 -0
- pyomsdk-0.1.0/src/pyomsdk/resources/api_keys_on_projects_resource.py +687 -0
- pyomsdk-0.1.0/src/pyomsdk/resources/automation_resource.py +142 -0
- pyomsdk-0.1.0/src/pyomsdk/resources/backup_configurations_resource.py +353 -0
- pyomsdk-0.1.0/src/pyomsdk/resources/backup_daemon_resource.py +481 -0
- pyomsdk-0.1.0/src/pyomsdk/resources/backup_encryption_keys_resource.py +150 -0
- pyomsdk-0.1.0/src/pyomsdk/resources/base_resource.py +44 -0
- pyomsdk-0.1.0/src/pyomsdk/resources/blockstore_resource.py +424 -0
- pyomsdk-0.1.0/src/pyomsdk/resources/clusters_resource.py +267 -0
- pyomsdk-0.1.0/src/pyomsdk/resources/configuration_resource.py +1258 -0
- pyomsdk-0.1.0/src/pyomsdk/resources/databases_resource.py +141 -0
- pyomsdk-0.1.0/src/pyomsdk/resources/deployment_regions_resource.py +441 -0
- pyomsdk-0.1.0/src/pyomsdk/resources/disks_resource.py +141 -0
- pyomsdk-0.1.0/src/pyomsdk/resources/enums.py +550 -0
- pyomsdk-0.1.0/src/pyomsdk/resources/events_resource.py +306 -0
- pyomsdk-0.1.0/src/pyomsdk/resources/feature_control_policies_resource.py +357 -0
- pyomsdk-0.1.0/src/pyomsdk/resources/file_system_store_resource.py +408 -0
- pyomsdk-0.1.0/src/pyomsdk/resources/global_access_list_resource.py +320 -0
- pyomsdk-0.1.0/src/pyomsdk/resources/global_alert_configurations_resource.py +1089 -0
- pyomsdk-0.1.0/src/pyomsdk/resources/global_alerts_resource.py +240 -0
- pyomsdk-0.1.0/src/pyomsdk/resources/global_api_keys_resource.py +525 -0
- pyomsdk-0.1.0/src/pyomsdk/resources/global_events_resource.py +160 -0
- pyomsdk-0.1.0/src/pyomsdk/resources/hosts_resource.py +517 -0
- pyomsdk-0.1.0/src/pyomsdk/resources/import_deployments_resource.py +458 -0
- pyomsdk-0.1.0/src/pyomsdk/resources/integration_settings.py +161 -0
- pyomsdk-0.1.0/src/pyomsdk/resources/integration_settings_resource.py +440 -0
- pyomsdk-0.1.0/src/pyomsdk/resources/log_collection_jobs_resource.py +558 -0
- pyomsdk-0.1.0/src/pyomsdk/resources/maintenance_windows_resource.py +389 -0
- pyomsdk-0.1.0/src/pyomsdk/resources/measurements_resource.py +640 -0
- pyomsdk-0.1.0/src/pyomsdk/resources/migrate_to_mongodb_atlas_resource.py +223 -0
- pyomsdk-0.1.0/src/pyomsdk/resources/oplog_store_resource.py +412 -0
- pyomsdk-0.1.0/src/pyomsdk/resources/organization_access_lists_resource.py +348 -0
- pyomsdk-0.1.0/src/pyomsdk/resources/organization_api_keys_resource.py +505 -0
- pyomsdk-0.1.0/src/pyomsdk/resources/organizations_resource.py +930 -0
- pyomsdk-0.1.0/src/pyomsdk/resources/performance_advisor_resource.py +200 -0
- pyomsdk-0.1.0/src/pyomsdk/resources/project_backup_job_resource.py +287 -0
- pyomsdk-0.1.0/src/pyomsdk/resources/projects_resource.py +1478 -0
- pyomsdk-0.1.0/src/pyomsdk/resources/restore_jobs_resource.py +531 -0
- pyomsdk-0.1.0/src/pyomsdk/resources/root_resource.py +56 -0
- pyomsdk-0.1.0/src/pyomsdk/resources/s3_compatible_blockstore_resource.py +662 -0
- pyomsdk-0.1.0/src/pyomsdk/resources/s3_oplog_resource.py +642 -0
- pyomsdk-0.1.0/src/pyomsdk/resources/server_usage_resource.py +1344 -0
- pyomsdk-0.1.0/src/pyomsdk/resources/snapshot_schedule_resource.py +240 -0
- pyomsdk-0.1.0/src/pyomsdk/resources/snapshots_resource.py +496 -0
- pyomsdk-0.1.0/src/pyomsdk/resources/sync_store_resource.py +412 -0
- pyomsdk-0.1.0/src/pyomsdk/resources/teams_resource.py +683 -0
- pyomsdk-0.1.0/src/pyomsdk/resources/telemetry_resource.py +60 -0
- pyomsdk-0.1.0/src/pyomsdk/resources/users_resource.py +873 -0
- pyomsdk-0.1.0/src/pyomsdk/resources/version_manifest_resource.py +68 -0
- pyomsdk-0.1.0/src/pyomsdk.egg-info/PKG-INFO +37 -0
- pyomsdk-0.1.0/src/pyomsdk.egg-info/SOURCES.txt +112 -0
- pyomsdk-0.1.0/src/pyomsdk.egg-info/dependency_links.txt +1 -0
- pyomsdk-0.1.0/src/pyomsdk.egg-info/requires.txt +8 -0
- pyomsdk-0.1.0/src/pyomsdk.egg-info/top_level.txt +1 -0
- pyomsdk-0.1.0/tests/test_accesslist.py +69 -0
- pyomsdk-0.1.0/tests/test_agents.py +102 -0
- pyomsdk-0.1.0/tests/test_alert_configurations.py +119 -0
- pyomsdk-0.1.0/tests/test_alerts.py +100 -0
- pyomsdk-0.1.0/tests/test_api_keys_on_projects.py +39 -0
- pyomsdk-0.1.0/tests/test_automation.py +60 -0
- pyomsdk-0.1.0/tests/test_backup_configurations.py +79 -0
- pyomsdk-0.1.0/tests/test_backup_daemon.py +134 -0
- pyomsdk-0.1.0/tests/test_backup_encryption_keys.py +65 -0
- pyomsdk-0.1.0/tests/test_blockstore.py +26 -0
- pyomsdk-0.1.0/tests/test_clusters.py +114 -0
- pyomsdk-0.1.0/tests/test_configuration.py +33 -0
- pyomsdk-0.1.0/tests/test_databases.py +60 -0
- pyomsdk-0.1.0/tests/test_deployment_regions.py +14 -0
- pyomsdk-0.1.0/tests/test_disks.py +60 -0
- pyomsdk-0.1.0/tests/test_events.py +114 -0
- pyomsdk-0.1.0/tests/test_feature_control_policies.py +70 -0
- pyomsdk-0.1.0/tests/test_file_system_store.py +26 -0
- pyomsdk-0.1.0/tests/test_global_access_list.py +26 -0
- pyomsdk-0.1.0/tests/test_global_alert_configurations.py +26 -0
- pyomsdk-0.1.0/tests/test_global_alerts.py +82 -0
- pyomsdk-0.1.0/tests/test_global_api_keys.py +26 -0
- pyomsdk-0.1.0/tests/test_global_events.py +53 -0
- pyomsdk-0.1.0/tests/test_hosts.py +33 -0
- pyomsdk-0.1.0/tests/test_import_deployments.py +131 -0
- pyomsdk-0.1.0/tests/test_integration_settings.py +20 -0
- pyomsdk-0.1.0/tests/test_log_collection_jobs.py +36 -0
- pyomsdk-0.1.0/tests/test_maintenance_windows.py +33 -0
- pyomsdk-0.1.0/tests/test_measurements.py +107 -0
- pyomsdk-0.1.0/tests/test_migrate_to_mongodb_atlas.py +83 -0
- pyomsdk-0.1.0/tests/test_oplog_store.py +26 -0
- pyomsdk-0.1.0/tests/test_organization_access_lists.py +121 -0
- pyomsdk-0.1.0/tests/test_organization_api_keys.py +33 -0
- pyomsdk-0.1.0/tests/test_organizations.py +110 -0
- pyomsdk-0.1.0/tests/test_performance_advisor.py +87 -0
- pyomsdk-0.1.0/tests/test_project_backup_job.py +71 -0
- pyomsdk-0.1.0/tests/test_projects.py +130 -0
- pyomsdk-0.1.0/tests/test_restore_jobs.py +35 -0
- pyomsdk-0.1.0/tests/test_root.py +15 -0
- pyomsdk-0.1.0/tests/test_s3_compatible_blockstore.py +26 -0
- pyomsdk-0.1.0/tests/test_s3_oplog.py +120 -0
- pyomsdk-0.1.0/tests/test_server_usage.py +33 -0
- pyomsdk-0.1.0/tests/test_snapshot_schedule.py +71 -0
- pyomsdk-0.1.0/tests/test_snapshots.py +58 -0
- pyomsdk-0.1.0/tests/test_sync_store.py +26 -0
- pyomsdk-0.1.0/tests/test_teams.py +33 -0
- pyomsdk-0.1.0/tests/test_telemetry.py +34 -0
- pyomsdk-0.1.0/tests/test_users.py +86 -0
- pyomsdk-0.1.0/tests/test_version_manifest.py +35 -0
pyomsdk-0.1.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Yaoxing
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
pyomsdk-0.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: pyomsdk
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Python SDK for MongoDB Ops Manager API
|
|
5
|
+
Author: Yaoxing
|
|
6
|
+
License: MIT License
|
|
7
|
+
|
|
8
|
+
Copyright (c) 2026 Yaoxing
|
|
9
|
+
|
|
10
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
11
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
12
|
+
in the Software without restriction, including without limitation the rights
|
|
13
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
14
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
15
|
+
furnished to do so, subject to the following conditions:
|
|
16
|
+
|
|
17
|
+
The above copyright notice and this permission notice shall be included in all
|
|
18
|
+
copies or substantial portions of the Software.
|
|
19
|
+
|
|
20
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
21
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
22
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
23
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
24
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
25
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
26
|
+
SOFTWARE.
|
|
27
|
+
|
|
28
|
+
Requires-Python: >=3.10
|
|
29
|
+
License-File: LICENSE
|
|
30
|
+
Requires-Dist: httpx<1.0,>=0.27
|
|
31
|
+
Requires-Dist: pydantic<3.0,>=2.7
|
|
32
|
+
Provides-Extra: dev
|
|
33
|
+
Requires-Dist: pytest<9.0,>=8.0; extra == "dev"
|
|
34
|
+
Requires-Dist: pylint<4.0,>=3.2; extra == "dev"
|
|
35
|
+
Requires-Dist: black<26.0,>=25.1; extra == "dev"
|
|
36
|
+
Requires-Dist: mypy<2.0,>=1.10; extra == "dev"
|
|
37
|
+
Dynamic: license-file
|
pyomsdk-0.1.0/README.md
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# Ops Manager SDK for Python
|
|
2
|
+
This is the repository for MongoDB Ops Manager API SDK in Python language.
|
|
3
|
+
|
|
4
|
+
## How It's Built?
|
|
5
|
+
The SDK code is generated based on the [Ops Mananger API document](https://www.mongodb.com/docs/ops-manager/current/api/).
|
|
6
|
+
1. Playwright is used to crawl pages listed in the sitemap.
|
|
7
|
+
2. Metadata of each API endpoint is extracted from the page.
|
|
8
|
+
3. The code generator uses the metadata to generate Python code SDK.
|
|
9
|
+
|
|
10
|
+
For more information about the generator, visit the repository [ops-manager-sdk](https://github.com/zhangyaoxing/ops-manager-sdk).
|
|
11
|
+
|
|
12
|
+
## Installation
|
|
13
|
+
```bash
|
|
14
|
+
pip install pyomsdk
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Example
|
|
18
|
+
```python
|
|
19
|
+
from pyomsdk import OpsManagerClient
|
|
20
|
+
|
|
21
|
+
client = OpsManagerClient(base_url="<ops_manager_url>", public_key="<public_key>", private_key="<private_key>")
|
|
22
|
+
orgs_resource = client.organizations_resource
|
|
23
|
+
# Create a new organization
|
|
24
|
+
org = orgs_resource.create_organization(
|
|
25
|
+
None, body_params=orgs_resource.CreateOrganizationBodyParams(name="New Organization")
|
|
26
|
+
)
|
|
27
|
+
|
|
28
|
+
# Delete an organization
|
|
29
|
+
path_params = orgs_resource.DeleteOrganizationPathParams(org_id=org["id"])
|
|
30
|
+
orgs_resource.delete_organization(path_params, None)
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## Instructions
|
|
34
|
+
- Not only the endpoint metadata, but also the descriptions are crawled. When you use the SDK, you should be able to see the API title, description, document link, etc.
|
|
35
|
+
- For each API
|
|
36
|
+
- Unique path/query/body parameter data classes are defined (If the API needs them) for you to pass parameters.
|
|
37
|
+
- All the optional parameters are defined as `Optional[]`. Other parameters are required.
|
|
38
|
+
- All the enum types are defined in the `pyomsdk.resources.enums`. They are not crawled but hard-coded because they are unlikely to change. You can use these values to help you initialize the parameters.
|
|
39
|
+
|
|
40
|
+
**Important Notes:** Keep in mind the metadata is from the API document. But the document is not always accurate. For example, some parameters doesn't have necessity, they are all marked as optional. When you have doubts, click the document link and review the document.
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=69", "wheel"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "pyomsdk"
|
|
7
|
+
version = "0.1.0"
|
|
8
|
+
description = "Python SDK for MongoDB Ops Manager API"
|
|
9
|
+
requires-python = ">=3.10"
|
|
10
|
+
license = { file = "LICENSE" }
|
|
11
|
+
authors = [{ name = "Yaoxing" }]
|
|
12
|
+
dependencies = ["httpx>=0.27,<1.0", "pydantic>=2.7,<3.0"]
|
|
13
|
+
|
|
14
|
+
[project.optional-dependencies]
|
|
15
|
+
dev = [
|
|
16
|
+
"pytest>=8.0,<9.0",
|
|
17
|
+
"pylint>=3.2,<4.0",
|
|
18
|
+
"black>=25.1,<26.0",
|
|
19
|
+
"mypy>=1.10,<2.0",
|
|
20
|
+
]
|
|
21
|
+
|
|
22
|
+
[tool.black]
|
|
23
|
+
line-length = 100
|
|
24
|
+
target-version = ["py310"]
|
|
25
|
+
|
|
26
|
+
[tool.setuptools]
|
|
27
|
+
package-dir = { "" = "src" }
|
|
28
|
+
|
|
29
|
+
[tool.setuptools.packages.find]
|
|
30
|
+
where = ["src"]
|
|
31
|
+
|
|
32
|
+
[tool.pylint.main]
|
|
33
|
+
py-version = "3.10"
|
|
34
|
+
jobs = 0
|
|
35
|
+
init-hook = "import sys; from pathlib import Path; sys.path.append(str(Path().resolve() / 'src'))"
|
|
36
|
+
|
|
37
|
+
[tool.pylint.format]
|
|
38
|
+
max-line-length = 100
|
|
39
|
+
|
|
40
|
+
[tool.pylint.messages_control]
|
|
41
|
+
disable = [
|
|
42
|
+
"missing-module-docstring",
|
|
43
|
+
"missing-class-docstring",
|
|
44
|
+
"missing-function-docstring",
|
|
45
|
+
"too-few-public-methods",
|
|
46
|
+
"duplicate-code",
|
|
47
|
+
]
|
|
48
|
+
|
|
49
|
+
[tool.mypy]
|
|
50
|
+
python_version = "3.10"
|
|
51
|
+
mypy_path = ["src"]
|
|
52
|
+
files = ["src", "tests"]
|
|
53
|
+
pretty = true
|
|
54
|
+
show_error_codes = true
|
|
55
|
+
explicit_package_bases = true
|
|
56
|
+
plugins = ["pydantic.mypy"]
|
pyomsdk-0.1.0/setup.cfg
ADDED
|
@@ -0,0 +1,317 @@
|
|
|
1
|
+
from importlib.metadata import version
|
|
2
|
+
from httpx import Auth, DigestAuth, Client
|
|
3
|
+
from .resources import AccessListResource
|
|
4
|
+
from .resources import BackupDaemonResource
|
|
5
|
+
from .resources import ProjectBackupJobResource
|
|
6
|
+
from .resources import OplogStoreResource
|
|
7
|
+
from .resources import S3OplogResource
|
|
8
|
+
from .resources import FileSystemStoreResource
|
|
9
|
+
from .resources import BlockstoreResource
|
|
10
|
+
from .resources import S3CompatibleBlockstoreResource
|
|
11
|
+
from .resources import SyncStoreResource
|
|
12
|
+
from .resources import AgentsResource
|
|
13
|
+
from .resources import AlertConfigurationsResource
|
|
14
|
+
from .resources import AlertsResource
|
|
15
|
+
from .resources import GlobalAccessListResource
|
|
16
|
+
from .resources import GlobalApiKeysResource
|
|
17
|
+
from .resources import OrganizationApiKeysResource
|
|
18
|
+
from .resources import OrganizationAccessListsResource
|
|
19
|
+
from .resources import ApiKeysOnProjectsResource
|
|
20
|
+
from .resources import ConfigurationResource
|
|
21
|
+
from .resources import AutomationResource
|
|
22
|
+
from .resources import DeploymentRegionsResource
|
|
23
|
+
from .resources import BackupConfigurationsResource
|
|
24
|
+
from .resources import SnapshotScheduleResource
|
|
25
|
+
from .resources import MigrateToMongodbAtlasResource
|
|
26
|
+
from .resources import ClustersResource
|
|
27
|
+
from .resources import FeatureControlPoliciesResource
|
|
28
|
+
from .resources import DatabasesResource
|
|
29
|
+
from .resources import ServerUsageResource
|
|
30
|
+
from .resources import DisksResource
|
|
31
|
+
from .resources import EventsResource
|
|
32
|
+
from .resources import GlobalEventsResource
|
|
33
|
+
from .resources import GlobalAlertConfigurationsResource
|
|
34
|
+
from .resources import GlobalAlertsResource
|
|
35
|
+
from .resources import ProjectsResource
|
|
36
|
+
from .resources import HostsResource
|
|
37
|
+
from .resources import ImportDeploymentsResource
|
|
38
|
+
from .resources import OrganizationsResource
|
|
39
|
+
from .resources import BackupEncryptionKeysResource
|
|
40
|
+
from .resources import LogCollectionJobsResource
|
|
41
|
+
from .resources import MaintenanceWindowsResource
|
|
42
|
+
from .resources import MeasurementsResource
|
|
43
|
+
from .resources import PerformanceAdvisorResource
|
|
44
|
+
from .resources import RestoreJobsResource
|
|
45
|
+
from .resources import RootResource
|
|
46
|
+
from .resources import SnapshotsResource
|
|
47
|
+
from .resources import TeamsResource
|
|
48
|
+
from .resources import TelemetryResource
|
|
49
|
+
from .resources import IntegrationSettingsResource
|
|
50
|
+
from .resources import UsersResource
|
|
51
|
+
from .resources import VersionManifestResource
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
class OpsManagerClient:
|
|
55
|
+
def __init__(
|
|
56
|
+
self, base_url: str, public_key: str, private_key: str, timeout: float = 30.0
|
|
57
|
+
) -> None:
|
|
58
|
+
ver_num: str = version("ops-manager-sdk")
|
|
59
|
+
assert (
|
|
60
|
+
base_url and public_key and private_key
|
|
61
|
+
), "Base URL, public key, and private key are required to initialize the OpsManagerClient."
|
|
62
|
+
auth: Auth = DigestAuth(public_key, private_key)
|
|
63
|
+
self._client = Client(
|
|
64
|
+
base_url=f"{base_url.rstrip('/')}",
|
|
65
|
+
headers={
|
|
66
|
+
"Accept": "application/json",
|
|
67
|
+
"Content-Type": "application/json",
|
|
68
|
+
"User-Agent": f"ops-manager-sdk-python/{ver_num}",
|
|
69
|
+
},
|
|
70
|
+
timeout=timeout,
|
|
71
|
+
auth=auth,
|
|
72
|
+
)
|
|
73
|
+
|
|
74
|
+
@property
|
|
75
|
+
def access_list_resource(self) -> AccessListResource:
|
|
76
|
+
"""Get the client for AccessListResource resource."""
|
|
77
|
+
return AccessListResource(self._client)
|
|
78
|
+
|
|
79
|
+
@property
|
|
80
|
+
def backup_daemon_resource(self) -> BackupDaemonResource:
|
|
81
|
+
"""Get the client for BackupDaemonResource resource."""
|
|
82
|
+
return BackupDaemonResource(self._client)
|
|
83
|
+
|
|
84
|
+
@property
|
|
85
|
+
def project_backup_job_resource(self) -> ProjectBackupJobResource:
|
|
86
|
+
"""Get the client for ProjectBackupJobResource resource."""
|
|
87
|
+
return ProjectBackupJobResource(self._client)
|
|
88
|
+
|
|
89
|
+
@property
|
|
90
|
+
def oplog_store_resource(self) -> OplogStoreResource:
|
|
91
|
+
"""Get the client for OplogStoreResource resource."""
|
|
92
|
+
return OplogStoreResource(self._client)
|
|
93
|
+
|
|
94
|
+
@property
|
|
95
|
+
def s3_oplog_resource(self) -> S3OplogResource:
|
|
96
|
+
"""Get the client for S3OplogResource resource."""
|
|
97
|
+
return S3OplogResource(self._client)
|
|
98
|
+
|
|
99
|
+
@property
|
|
100
|
+
def file_system_store_resource(self) -> FileSystemStoreResource:
|
|
101
|
+
"""Get the client for FileSystemStoreResource resource."""
|
|
102
|
+
return FileSystemStoreResource(self._client)
|
|
103
|
+
|
|
104
|
+
@property
|
|
105
|
+
def blockstore_resource(self) -> BlockstoreResource:
|
|
106
|
+
"""Get the client for BlockstoreResource resource."""
|
|
107
|
+
return BlockstoreResource(self._client)
|
|
108
|
+
|
|
109
|
+
@property
|
|
110
|
+
def s3_compatible_blockstore_resource(self) -> S3CompatibleBlockstoreResource:
|
|
111
|
+
"""Get the client for S3CompatibleBlockstoreResource resource."""
|
|
112
|
+
return S3CompatibleBlockstoreResource(self._client)
|
|
113
|
+
|
|
114
|
+
@property
|
|
115
|
+
def sync_store_resource(self) -> SyncStoreResource:
|
|
116
|
+
"""Get the client for SyncStoreResource resource."""
|
|
117
|
+
return SyncStoreResource(self._client)
|
|
118
|
+
|
|
119
|
+
@property
|
|
120
|
+
def agents_resource(self) -> AgentsResource:
|
|
121
|
+
"""Get the client for AgentsResource resource."""
|
|
122
|
+
return AgentsResource(self._client)
|
|
123
|
+
|
|
124
|
+
@property
|
|
125
|
+
def alert_configurations_resource(self) -> AlertConfigurationsResource:
|
|
126
|
+
"""Get the client for AlertConfigurationsResource resource."""
|
|
127
|
+
return AlertConfigurationsResource(self._client)
|
|
128
|
+
|
|
129
|
+
@property
|
|
130
|
+
def alerts_resource(self) -> AlertsResource:
|
|
131
|
+
"""Get the client for AlertsResource resource."""
|
|
132
|
+
return AlertsResource(self._client)
|
|
133
|
+
|
|
134
|
+
@property
|
|
135
|
+
def global_access_list_resource(self) -> GlobalAccessListResource:
|
|
136
|
+
"""Get the client for GlobalAccessListResource resource."""
|
|
137
|
+
return GlobalAccessListResource(self._client)
|
|
138
|
+
|
|
139
|
+
@property
|
|
140
|
+
def global_api_keys_resource(self) -> GlobalApiKeysResource:
|
|
141
|
+
"""Get the client for GlobalApiKeysResource resource."""
|
|
142
|
+
return GlobalApiKeysResource(self._client)
|
|
143
|
+
|
|
144
|
+
@property
|
|
145
|
+
def organization_api_keys_resource(self) -> OrganizationApiKeysResource:
|
|
146
|
+
"""Get the client for OrganizationApiKeysResource resource."""
|
|
147
|
+
return OrganizationApiKeysResource(self._client)
|
|
148
|
+
|
|
149
|
+
@property
|
|
150
|
+
def organization_access_lists_resource(self) -> OrganizationAccessListsResource:
|
|
151
|
+
"""Get the client for OrganizationAccessListsResource resource."""
|
|
152
|
+
return OrganizationAccessListsResource(self._client)
|
|
153
|
+
|
|
154
|
+
@property
|
|
155
|
+
def api_keys_on_projects_resource(self) -> ApiKeysOnProjectsResource:
|
|
156
|
+
"""Get the client for ApiKeysOnProjectsResource resource."""
|
|
157
|
+
return ApiKeysOnProjectsResource(self._client)
|
|
158
|
+
|
|
159
|
+
@property
|
|
160
|
+
def configuration_resource(self) -> ConfigurationResource:
|
|
161
|
+
"""Get the client for ConfigurationResource resource."""
|
|
162
|
+
return ConfigurationResource(self._client)
|
|
163
|
+
|
|
164
|
+
@property
|
|
165
|
+
def automation_resource(self) -> AutomationResource:
|
|
166
|
+
"""Get the client for AutomationResource resource."""
|
|
167
|
+
return AutomationResource(self._client)
|
|
168
|
+
|
|
169
|
+
@property
|
|
170
|
+
def deployment_regions_resource(self) -> DeploymentRegionsResource:
|
|
171
|
+
"""Get the client for DeploymentRegionsResource resource."""
|
|
172
|
+
return DeploymentRegionsResource(self._client)
|
|
173
|
+
|
|
174
|
+
@property
|
|
175
|
+
def backup_configurations_resource(self) -> BackupConfigurationsResource:
|
|
176
|
+
"""Get the client for BackupConfigurationsResource resource."""
|
|
177
|
+
return BackupConfigurationsResource(self._client)
|
|
178
|
+
|
|
179
|
+
@property
|
|
180
|
+
def snapshot_schedule_resource(self) -> SnapshotScheduleResource:
|
|
181
|
+
"""Get the client for SnapshotScheduleResource resource."""
|
|
182
|
+
return SnapshotScheduleResource(self._client)
|
|
183
|
+
|
|
184
|
+
@property
|
|
185
|
+
def migrate_to_mongodb_atlas_resource(self) -> MigrateToMongodbAtlasResource:
|
|
186
|
+
"""Get the client for MigrateToMongodbAtlasResource resource."""
|
|
187
|
+
return MigrateToMongodbAtlasResource(self._client)
|
|
188
|
+
|
|
189
|
+
@property
|
|
190
|
+
def clusters_resource(self) -> ClustersResource:
|
|
191
|
+
"""Get the client for ClustersResource resource."""
|
|
192
|
+
return ClustersResource(self._client)
|
|
193
|
+
|
|
194
|
+
@property
|
|
195
|
+
def feature_control_policies_resource(self) -> FeatureControlPoliciesResource:
|
|
196
|
+
"""Get the client for FeatureControlPoliciesResource resource."""
|
|
197
|
+
return FeatureControlPoliciesResource(self._client)
|
|
198
|
+
|
|
199
|
+
@property
|
|
200
|
+
def databases_resource(self) -> DatabasesResource:
|
|
201
|
+
"""Get the client for DatabasesResource resource."""
|
|
202
|
+
return DatabasesResource(self._client)
|
|
203
|
+
|
|
204
|
+
@property
|
|
205
|
+
def server_usage_resource(self) -> ServerUsageResource:
|
|
206
|
+
"""Get the client for ServerUsageResource resource."""
|
|
207
|
+
return ServerUsageResource(self._client)
|
|
208
|
+
|
|
209
|
+
@property
|
|
210
|
+
def disks_resource(self) -> DisksResource:
|
|
211
|
+
"""Get the client for DisksResource resource."""
|
|
212
|
+
return DisksResource(self._client)
|
|
213
|
+
|
|
214
|
+
@property
|
|
215
|
+
def events_resource(self) -> EventsResource:
|
|
216
|
+
"""Get the client for EventsResource resource."""
|
|
217
|
+
return EventsResource(self._client)
|
|
218
|
+
|
|
219
|
+
@property
|
|
220
|
+
def global_events_resource(self) -> GlobalEventsResource:
|
|
221
|
+
"""Get the client for GlobalEventsResource resource."""
|
|
222
|
+
return GlobalEventsResource(self._client)
|
|
223
|
+
|
|
224
|
+
@property
|
|
225
|
+
def global_alert_configurations_resource(self) -> GlobalAlertConfigurationsResource:
|
|
226
|
+
"""Get the client for GlobalAlertConfigurationsResource resource."""
|
|
227
|
+
return GlobalAlertConfigurationsResource(self._client)
|
|
228
|
+
|
|
229
|
+
@property
|
|
230
|
+
def global_alerts_resource(self) -> GlobalAlertsResource:
|
|
231
|
+
"""Get the client for GlobalAlertsResource resource."""
|
|
232
|
+
return GlobalAlertsResource(self._client)
|
|
233
|
+
|
|
234
|
+
@property
|
|
235
|
+
def projects_resource(self) -> ProjectsResource:
|
|
236
|
+
"""Get the client for ProjectsResource resource."""
|
|
237
|
+
return ProjectsResource(self._client)
|
|
238
|
+
|
|
239
|
+
@property
|
|
240
|
+
def hosts_resource(self) -> HostsResource:
|
|
241
|
+
"""Get the client for HostsResource resource."""
|
|
242
|
+
return HostsResource(self._client)
|
|
243
|
+
|
|
244
|
+
@property
|
|
245
|
+
def import_deployments_resource(self) -> ImportDeploymentsResource:
|
|
246
|
+
"""Get the client for ImportDeploymentsResource resource."""
|
|
247
|
+
return ImportDeploymentsResource(self._client)
|
|
248
|
+
|
|
249
|
+
@property
|
|
250
|
+
def organizations_resource(self) -> OrganizationsResource:
|
|
251
|
+
"""Get the client for OrganizationsResource resource."""
|
|
252
|
+
return OrganizationsResource(self._client)
|
|
253
|
+
|
|
254
|
+
@property
|
|
255
|
+
def backup_encryption_keys_resource(self) -> BackupEncryptionKeysResource:
|
|
256
|
+
"""Get the client for BackupEncryptionKeysResource resource."""
|
|
257
|
+
return BackupEncryptionKeysResource(self._client)
|
|
258
|
+
|
|
259
|
+
@property
|
|
260
|
+
def log_collection_jobs_resource(self) -> LogCollectionJobsResource:
|
|
261
|
+
"""Get the client for LogCollectionJobsResource resource."""
|
|
262
|
+
return LogCollectionJobsResource(self._client)
|
|
263
|
+
|
|
264
|
+
@property
|
|
265
|
+
def maintenance_windows_resource(self) -> MaintenanceWindowsResource:
|
|
266
|
+
"""Get the client for MaintenanceWindowsResource resource."""
|
|
267
|
+
return MaintenanceWindowsResource(self._client)
|
|
268
|
+
|
|
269
|
+
@property
|
|
270
|
+
def measurements_resource(self) -> MeasurementsResource:
|
|
271
|
+
"""Get the client for MeasurementsResource resource."""
|
|
272
|
+
return MeasurementsResource(self._client)
|
|
273
|
+
|
|
274
|
+
@property
|
|
275
|
+
def performance_advisor_resource(self) -> PerformanceAdvisorResource:
|
|
276
|
+
"""Get the client for PerformanceAdvisorResource resource."""
|
|
277
|
+
return PerformanceAdvisorResource(self._client)
|
|
278
|
+
|
|
279
|
+
@property
|
|
280
|
+
def restore_jobs_resource(self) -> RestoreJobsResource:
|
|
281
|
+
"""Get the client for RestoreJobsResource resource."""
|
|
282
|
+
return RestoreJobsResource(self._client)
|
|
283
|
+
|
|
284
|
+
@property
|
|
285
|
+
def root_resource(self) -> RootResource:
|
|
286
|
+
"""Get the client for RootResource resource."""
|
|
287
|
+
return RootResource(self._client)
|
|
288
|
+
|
|
289
|
+
@property
|
|
290
|
+
def snapshots_resource(self) -> SnapshotsResource:
|
|
291
|
+
"""Get the client for SnapshotsResource resource."""
|
|
292
|
+
return SnapshotsResource(self._client)
|
|
293
|
+
|
|
294
|
+
@property
|
|
295
|
+
def teams_resource(self) -> TeamsResource:
|
|
296
|
+
"""Get the client for TeamsResource resource."""
|
|
297
|
+
return TeamsResource(self._client)
|
|
298
|
+
|
|
299
|
+
@property
|
|
300
|
+
def telemetry_resource(self) -> TelemetryResource:
|
|
301
|
+
"""Get the client for TelemetryResource resource."""
|
|
302
|
+
return TelemetryResource(self._client)
|
|
303
|
+
|
|
304
|
+
@property
|
|
305
|
+
def integration_settings_resource(self) -> IntegrationSettingsResource:
|
|
306
|
+
"""Get the client for IntegrationSettingsResource resource."""
|
|
307
|
+
return IntegrationSettingsResource(self._client)
|
|
308
|
+
|
|
309
|
+
@property
|
|
310
|
+
def users_resource(self) -> UsersResource:
|
|
311
|
+
"""Get the client for UsersResource resource."""
|
|
312
|
+
return UsersResource(self._client)
|
|
313
|
+
|
|
314
|
+
@property
|
|
315
|
+
def version_manifest_resource(self) -> VersionManifestResource:
|
|
316
|
+
"""Get the client for VersionManifestResource resource."""
|
|
317
|
+
return VersionManifestResource(self._client)
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
from .access_list_resource import AccessListResource
|
|
2
|
+
from .backup_daemon_resource import BackupDaemonResource
|
|
3
|
+
from .project_backup_job_resource import ProjectBackupJobResource
|
|
4
|
+
from .oplog_store_resource import OplogStoreResource
|
|
5
|
+
from .s3_oplog_resource import S3OplogResource
|
|
6
|
+
from .file_system_store_resource import FileSystemStoreResource
|
|
7
|
+
from .blockstore_resource import BlockstoreResource
|
|
8
|
+
from .s3_compatible_blockstore_resource import S3CompatibleBlockstoreResource
|
|
9
|
+
from .sync_store_resource import SyncStoreResource
|
|
10
|
+
from .agents_resource import AgentsResource
|
|
11
|
+
from .alert_configurations_resource import AlertConfigurationsResource
|
|
12
|
+
from .alerts_resource import AlertsResource
|
|
13
|
+
from .global_access_list_resource import GlobalAccessListResource
|
|
14
|
+
from .global_api_keys_resource import GlobalApiKeysResource
|
|
15
|
+
from .organization_api_keys_resource import OrganizationApiKeysResource
|
|
16
|
+
from .organization_access_lists_resource import OrganizationAccessListsResource
|
|
17
|
+
from .api_keys_on_projects_resource import ApiKeysOnProjectsResource
|
|
18
|
+
from .configuration_resource import ConfigurationResource
|
|
19
|
+
from .automation_resource import AutomationResource
|
|
20
|
+
from .deployment_regions_resource import DeploymentRegionsResource
|
|
21
|
+
from .backup_configurations_resource import BackupConfigurationsResource
|
|
22
|
+
from .snapshot_schedule_resource import SnapshotScheduleResource
|
|
23
|
+
from .migrate_to_mongodb_atlas_resource import MigrateToMongodbAtlasResource
|
|
24
|
+
from .clusters_resource import ClustersResource
|
|
25
|
+
from .feature_control_policies_resource import FeatureControlPoliciesResource
|
|
26
|
+
from .databases_resource import DatabasesResource
|
|
27
|
+
from .server_usage_resource import ServerUsageResource
|
|
28
|
+
from .disks_resource import DisksResource
|
|
29
|
+
from .events_resource import EventsResource
|
|
30
|
+
from .global_events_resource import GlobalEventsResource
|
|
31
|
+
from .global_alert_configurations_resource import GlobalAlertConfigurationsResource
|
|
32
|
+
from .global_alerts_resource import GlobalAlertsResource
|
|
33
|
+
from .projects_resource import ProjectsResource
|
|
34
|
+
from .hosts_resource import HostsResource
|
|
35
|
+
from .import_deployments_resource import ImportDeploymentsResource
|
|
36
|
+
from .organizations_resource import OrganizationsResource
|
|
37
|
+
from .backup_encryption_keys_resource import BackupEncryptionKeysResource
|
|
38
|
+
from .log_collection_jobs_resource import LogCollectionJobsResource
|
|
39
|
+
from .maintenance_windows_resource import MaintenanceWindowsResource
|
|
40
|
+
from .measurements_resource import MeasurementsResource
|
|
41
|
+
from .performance_advisor_resource import PerformanceAdvisorResource
|
|
42
|
+
from .restore_jobs_resource import RestoreJobsResource
|
|
43
|
+
from .root_resource import RootResource
|
|
44
|
+
from .snapshots_resource import SnapshotsResource
|
|
45
|
+
from .teams_resource import TeamsResource
|
|
46
|
+
from .telemetry_resource import TelemetryResource
|
|
47
|
+
from .integration_settings_resource import IntegrationSettingsResource
|
|
48
|
+
from .users_resource import UsersResource
|
|
49
|
+
from .version_manifest_resource import VersionManifestResource
|
|
50
|
+
from .integration_settings import PagerDutyIntegrationSettings
|
|
51
|
+
from .integration_settings import SlackIntegrationSettings
|
|
52
|
+
from .integration_settings import DatadogIntegrationSettings
|
|
53
|
+
from .integration_settings import HipChatIntegrationSettings
|
|
54
|
+
from .integration_settings import OpsgenieIntegrationSettings
|
|
55
|
+
from .integration_settings import VictorOpsIntegrationSettings
|
|
56
|
+
from .integration_settings import WebhookIntegrationSettings
|
|
57
|
+
from .integration_settings import MicrosoftTeamsIntegrationSettings
|
|
58
|
+
from .integration_settings import PrometheusIntegrationSettings
|
|
59
|
+
|
|
60
|
+
__all__ = [
|
|
61
|
+
"AccessListResource",
|
|
62
|
+
"BackupDaemonResource",
|
|
63
|
+
"ProjectBackupJobResource",
|
|
64
|
+
"OplogStoreResource",
|
|
65
|
+
"S3OplogResource",
|
|
66
|
+
"FileSystemStoreResource",
|
|
67
|
+
"BlockstoreResource",
|
|
68
|
+
"S3CompatibleBlockstoreResource",
|
|
69
|
+
"SyncStoreResource",
|
|
70
|
+
"AgentsResource",
|
|
71
|
+
"AlertConfigurationsResource",
|
|
72
|
+
"AlertsResource",
|
|
73
|
+
"GlobalAccessListResource",
|
|
74
|
+
"GlobalApiKeysResource",
|
|
75
|
+
"OrganizationApiKeysResource",
|
|
76
|
+
"OrganizationAccessListsResource",
|
|
77
|
+
"ApiKeysOnProjectsResource",
|
|
78
|
+
"ConfigurationResource",
|
|
79
|
+
"AutomationResource",
|
|
80
|
+
"DeploymentRegionsResource",
|
|
81
|
+
"BackupConfigurationsResource",
|
|
82
|
+
"SnapshotScheduleResource",
|
|
83
|
+
"MigrateToMongodbAtlasResource",
|
|
84
|
+
"ClustersResource",
|
|
85
|
+
"FeatureControlPoliciesResource",
|
|
86
|
+
"DatabasesResource",
|
|
87
|
+
"ServerUsageResource",
|
|
88
|
+
"DisksResource",
|
|
89
|
+
"EventsResource",
|
|
90
|
+
"GlobalEventsResource",
|
|
91
|
+
"GlobalAlertConfigurationsResource",
|
|
92
|
+
"GlobalAlertsResource",
|
|
93
|
+
"ProjectsResource",
|
|
94
|
+
"HostsResource",
|
|
95
|
+
"ImportDeploymentsResource",
|
|
96
|
+
"OrganizationsResource",
|
|
97
|
+
"BackupEncryptionKeysResource",
|
|
98
|
+
"LogCollectionJobsResource",
|
|
99
|
+
"MaintenanceWindowsResource",
|
|
100
|
+
"MeasurementsResource",
|
|
101
|
+
"PerformanceAdvisorResource",
|
|
102
|
+
"RestoreJobsResource",
|
|
103
|
+
"RootResource",
|
|
104
|
+
"SnapshotsResource",
|
|
105
|
+
"TeamsResource",
|
|
106
|
+
"TelemetryResource",
|
|
107
|
+
"IntegrationSettingsResource",
|
|
108
|
+
"UsersResource",
|
|
109
|
+
"VersionManifestResource",
|
|
110
|
+
"PagerDutyIntegrationSettings",
|
|
111
|
+
"SlackIntegrationSettings",
|
|
112
|
+
"DatadogIntegrationSettings",
|
|
113
|
+
"HipChatIntegrationSettings",
|
|
114
|
+
"OpsgenieIntegrationSettings",
|
|
115
|
+
"VictorOpsIntegrationSettings",
|
|
116
|
+
"WebhookIntegrationSettings",
|
|
117
|
+
"MicrosoftTeamsIntegrationSettings",
|
|
118
|
+
"PrometheusIntegrationSettings",
|
|
119
|
+
]
|