linode-api4 5.44.0__tar.gz → 5.46.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.
- {linode_api4-5.44.0/linode_api4.egg-info → linode_api4-5.46.0}/PKG-INFO +1 -1
- {linode_api4-5.44.0 → linode_api4-5.46.0}/linode_api4/groups/linode.py +5 -0
- linode_api4-5.46.0/linode_api4/groups/monitor.py +627 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/linode_api4/groups/networking.py +124 -12
- {linode_api4-5.44.0 → linode_api4-5.46.0}/linode_api4/groups/nodebalancer.py +7 -1
- {linode_api4-5.44.0 → linode_api4-5.46.0}/linode_api4/groups/object_storage.py +3 -3
- {linode_api4-5.44.0 → linode_api4-5.46.0}/linode_api4/groups/tag.py +7 -1
- {linode_api4-5.44.0 → linode_api4-5.46.0}/linode_api4/groups/vpc.py +24 -1
- {linode_api4-5.44.0 → linode_api4-5.46.0}/linode_api4/objects/linode.py +14 -5
- {linode_api4-5.44.0 → linode_api4-5.46.0}/linode_api4/objects/monitor.py +390 -1
- {linode_api4-5.44.0 → linode_api4-5.46.0}/linode_api4/objects/networking.py +68 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/linode_api4/objects/object_storage.py +1 -1
- {linode_api4-5.44.0 → linode_api4-5.46.0}/linode_api4/objects/region.py +2 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/linode_api4/objects/tag.py +4 -1
- {linode_api4-5.44.0 → linode_api4-5.46.0}/linode_api4/objects/vpc.py +34 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/linode_api4/version.py +1 -1
- {linode_api4-5.44.0 → linode_api4-5.46.0/linode_api4.egg-info}/PKG-INFO +1 -1
- {linode_api4-5.44.0 → linode_api4-5.46.0}/linode_api4.egg-info/SOURCES.txt +12 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/pyproject.toml +2 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/monitor_alert-definitions.json +3 -0
- linode_api4-5.46.0/test/fixtures/monitor_dashboards.json +404 -0
- linode_api4-5.46.0/test/fixtures/monitor_dashboards_1.json +83 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/monitor_services_dbaas_alert-definitions.json +5 -2
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/monitor_services_dbaas_alert-definitions_12345.json +5 -2
- linode_api4-5.46.0/test/fixtures/monitor_services_dbaas_alert-definitions_12345_clone.json +57 -0
- linode_api4-5.46.0/test/fixtures/monitor_services_dbaas_dashboards.json +90 -0
- linode_api4-5.46.0/test/fixtures/monitor_streams.json +31 -0
- linode_api4-5.46.0/test/fixtures/monitor_streams_1_history.json +31 -0
- linode_api4-5.46.0/test/fixtures/monitor_streams_2.json +43 -0
- linode_api4-5.46.0/test/fixtures/monitor_streams_3.json +29 -0
- linode_api4-5.46.0/test/fixtures/monitor_streams_destinations.json +24 -0
- linode_api4-5.46.0/test/fixtures/monitor_streams_destinations_1_history.json +24 -0
- linode_api4-5.46.0/test/fixtures/monitor_streams_destinations_2.json +36 -0
- linode_api4-5.46.0/test/fixtures/networking_reserved_ips.json +35 -0
- linode_api4-5.46.0/test/fixtures/networking_reserved_ips_types.json +27 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/vpcs.json +5 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/vpcs_123456.json +5 -0
- linode_api4-5.46.0/test/fixtures/vpcs_default-ranges.json +10 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/integration/conftest.py +92 -11
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/integration/linode_client/test_linode_client.py +34 -36
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/integration/models/account/test_account.py +2 -1
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/integration/models/domain/test_domain.py +1 -2
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/integration/models/linode/interfaces/test_interfaces.py +99 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/integration/models/linode/test_linode.py +45 -11
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/integration/models/lke/test_lke.py +0 -11
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/integration/models/monitor/test_monitor.py +142 -24
- linode_api4-5.46.0/test/integration/models/monitor/test_monitor_logs.py +521 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/integration/models/networking/test_networking.py +206 -3
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/integration/models/nodebalancer/test_nodebalancer.py +28 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/integration/models/placement/test_placement.py +1 -1
- linode_api4-5.46.0/test/integration/models/tag/test_tag.py +51 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/integration/models/vpc/test_vpc.py +34 -3
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/unit/groups/monitor_api_test.py +77 -1
- linode_api4-5.46.0/test/unit/groups/networking_test.py +240 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/unit/groups/vpc_test.py +18 -1
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/unit/linode_client_test.py +1 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/unit/objects/lke_test.py +0 -11
- linode_api4-5.46.0/test/unit/objects/monitor_test.py +761 -0
- linode_api4-5.46.0/test/unit/objects/networking_test.py +457 -0
- linode_api4-5.46.0/test/unit/objects/tag_test.py +103 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/unit/objects/vpc_test.py +1 -0
- linode_api4-5.44.0/linode_api4/groups/monitor.py +0 -334
- linode_api4-5.44.0/test/fixtures/monitor_dashboards.json +0 -41
- linode_api4-5.44.0/test/fixtures/monitor_dashboards_1.json +0 -34
- linode_api4-5.44.0/test/fixtures/monitor_services_dbaas_dashboards.json +0 -48
- linode_api4-5.44.0/test/integration/models/tag/test_tag.py +0 -22
- linode_api4-5.44.0/test/unit/groups/networking_test.py +0 -17
- linode_api4-5.44.0/test/unit/objects/monitor_test.py +0 -171
- linode_api4-5.44.0/test/unit/objects/networking_test.py +0 -173
- linode_api4-5.44.0/test/unit/objects/tag_test.py +0 -46
- {linode_api4-5.44.0 → linode_api4-5.46.0}/LICENSE +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/MANIFEST.in +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/README.rst +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/examples/install-on-linode/app.py +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/examples/install-on-linode/make_stackscript.py +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/linode_api4/__init__.py +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/linode_api4/common.py +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/linode_api4/errors.py +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/linode_api4/groups/__init__.py +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/linode_api4/groups/account.py +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/linode_api4/groups/beta.py +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/linode_api4/groups/database.py +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/linode_api4/groups/domain.py +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/linode_api4/groups/group.py +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/linode_api4/groups/image.py +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/linode_api4/groups/image_share_group.py +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/linode_api4/groups/lke.py +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/linode_api4/groups/lke_tier.py +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/linode_api4/groups/lock.py +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/linode_api4/groups/longview.py +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/linode_api4/groups/maintenance.py +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/linode_api4/groups/monitor_api.py +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/linode_api4/groups/placement.py +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/linode_api4/groups/polling.py +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/linode_api4/groups/profile.py +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/linode_api4/groups/region.py +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/linode_api4/groups/support.py +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/linode_api4/groups/volume.py +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/linode_api4/linode_client.py +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/linode_api4/login_client.py +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/linode_api4/objects/__init__.py +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/linode_api4/objects/account.py +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/linode_api4/objects/base.py +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/linode_api4/objects/beta.py +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/linode_api4/objects/database.py +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/linode_api4/objects/dbase.py +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/linode_api4/objects/domain.py +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/linode_api4/objects/filtering.py +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/linode_api4/objects/image.py +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/linode_api4/objects/image_share_group.py +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/linode_api4/objects/linode_interfaces.py +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/linode_api4/objects/lke.py +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/linode_api4/objects/lock.py +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/linode_api4/objects/longview.py +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/linode_api4/objects/monitor_api.py +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/linode_api4/objects/nodebalancer.py +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/linode_api4/objects/placement.py +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/linode_api4/objects/profile.py +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/linode_api4/objects/serializable.py +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/linode_api4/objects/support.py +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/linode_api4/objects/volume.py +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/linode_api4/paginated_list.py +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/linode_api4/polling.py +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/linode_api4/util.py +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/linode_api4.egg-info/dependency_links.txt +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/linode_api4.egg-info/requires.txt +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/linode_api4.egg-info/top_level.txt +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/setup.cfg +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/setup.py +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/__init__.py +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/account.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/account_availability.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/account_availability_us-east.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/account_betas.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/account_betas_cool.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/account_child-accounts.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/account_child-accounts_123456.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/account_child-accounts_123456_token.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/account_events_123.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/account_invoices.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/account_invoices_123.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/account_invoices_123456_items.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/account_logins.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/account_logins_123.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/account_maintenance.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/account_notifications.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/account_oauth-clients_2737bf16b39ab5d7b4a1.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/account_payment-method_123.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/account_payment-methods.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/account_payments.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/account_promo-codes.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/account_service-transfers.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/account_service-transfers_12345.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/account_settings.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/account_transfer.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/account_users_test-user.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/betas.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/betas_active.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/databases_engines.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/databases_instances.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/databases_mysql_config.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/databases_mysql_instances.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/databases_mysql_instances_123_credentials.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/databases_mysql_instances_123_credentials_reset.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/databases_mysql_instances_123_patch.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/databases_mysql_instances_123_resume.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/databases_mysql_instances_123_ssl.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/databases_mysql_instances_123_suspend.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/databases_postgresql_config.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/databases_postgresql_instances.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/databases_postgresql_instances_123_credentials.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/databases_postgresql_instances_123_credentials_reset.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/databases_postgresql_instances_123_patch.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/databases_postgresql_instances_123_resume.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/databases_postgresql_instances_123_ssl.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/databases_postgresql_instances_123_suspend.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/databases_types.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/domains.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/domains_12345_clone.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/domains_12345_records.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/domains_12345_zone-file.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/domains_import.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/images.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/images_private_1234_sharegroups.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/images_private_123_regions.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/images_private_1337.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/images_sharegroups.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/images_sharegroups_1234.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/images_sharegroups_1234_images.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/images_sharegroups_1234_images_shared_1.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/images_sharegroups_1234_members.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/images_sharegroups_1234_members_abc123.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/images_sharegroups_tokens.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/images_sharegroups_tokens_abc123.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/images_sharegroups_tokens_abc123_sharegroup.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/images_sharegroups_tokens_abc123_sharegroup_images.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/images_upload.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/linode_instances.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/linode_instances_123_backups.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/linode_instances_123_configs.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/linode_instances_123_configs_456789.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/linode_instances_123_configs_456789_interfaces.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/linode_instances_123_configs_456789_interfaces_123.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/linode_instances_123_configs_456789_interfaces_123_put.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/linode_instances_123_configs_456789_interfaces_321.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/linode_instances_123_configs_456789_interfaces_456.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/linode_instances_123_disks.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/linode_instances_123_disks_12345_clone.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/linode_instances_123_firewalls.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/linode_instances_123_ips.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/linode_instances_123_nodebalancers.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/linode_instances_123_transfer.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/linode_instances_123_transfer_2023_4.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/linode_instances_123_volumes.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/linode_instances_124.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/linode_instances_124_interfaces.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/linode_instances_124_interfaces_123.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/linode_instances_124_interfaces_123_firewalls.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/linode_instances_124_interfaces_456.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/linode_instances_124_interfaces_789.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/linode_instances_124_interfaces_settings.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/linode_instances_124_upgrade-interfaces.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/linode_stackscripts_10079.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/linode_types.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/linode_types_g6-nanode-1.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/lke_clusters.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/lke_clusters_18881.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/lke_clusters_18881_control__plane__acl.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/lke_clusters_18881_dashboard.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/lke_clusters_18881_nodes_123456.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/lke_clusters_18881_pools_456.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/lke_clusters_18882.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/lke_clusters_18882_pools_789.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/lke_tiers_standard_versions.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/lke_types.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/lke_versions.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/locks.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/locks_1.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/longview_clients.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/longview_plan.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/longview_subscriptions.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/maintenance_policies.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/mongodb.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/monitor_alert-channels.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/monitor_services.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/monitor_services_dbaas.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/monitor_services_dbaas_alert-definitions_12345_entities.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/monitor_services_dbaas_metric-definitions.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/monitor_services_dbaas_metrics.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/monitor_services_dbaas_token.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/monitor_services_linode_token.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/network-transfer_prices.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/networking_firewalls.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/networking_firewalls_123.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/networking_firewalls_123_devices.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/networking_firewalls_123_devices_123.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/networking_firewalls_123_devices_456.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/networking_firewalls_123_history.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/networking_firewalls_123_history_rules_2.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/networking_firewalls_123_rules.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/networking_firewalls_settings.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/networking_firewalls_templates.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/networking_firewalls_templates_public.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/networking_firewalls_templates_vpc.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/networking_ips_127.0.0.1.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/networking_ipv6_pools.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/networking_ipv6_ranges.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/networking_ipv6_ranges_2600%3A3c01%3A%3A.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/networking_vlans.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/nodebalancers.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/nodebalancers_123456.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/nodebalancers_123456_configs.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/nodebalancers_123456_configs_65432_nodes.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/nodebalancers_12345_configs_4567_rebuild.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/nodebalancers_12345_firewalls.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/nodebalancers_12345_stats.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/nodebalancers_types.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/object-storage_buckets.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/object-storage_buckets_us-east-1.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/object-storage_buckets_us-east-1_example-bucket.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/object-storage_buckets_us-east-1_example-bucket_object-acl.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/object-storage_buckets_us-east-1_example-bucket_object-list.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/object-storage_buckets_us-east-1_example-bucket_object-url.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/object-storage_buckets_us-east-1_example-bucket_ssl.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/object-storage_buckets_us-east_example-bucket_access.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/object-storage_clusters.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/object-storage_global-quotas.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/object-storage_global-quotas_obj-access-keys-per-account.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/object-storage_global-quotas_obj-access-keys-per-account_usage.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/object-storage_keys.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/object-storage_quotas.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/object-storage_quotas_obj-objects-us-ord-1.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/object-storage_quotas_obj-objects-us-ord-1_usage.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/object-storage_transfer.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/object-storage_types.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/placement_groups.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/placement_groups_123.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/profile.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/profile_device_123.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/profile_devices.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/profile_logins.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/profile_logins_123.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/profile_preferences.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/profile_security-questions.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/profile_sshkeys.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/regions.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/regions_availability.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/regions_us-east_availability.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/regions_us-east_vpc-availability.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/regions_vpc-availability.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/support_tickets_123.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/tags.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/tags_nothing.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/tags_something.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/testmappedobj1.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/volumes.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/volumes_types.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/vpcs_123456_ips.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/vpcs_123456_subnets.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/vpcs_123456_subnets_789.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/fixtures/vpcs_ips.json +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/integration/__init__.py +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/integration/filters/fixtures.py +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/integration/filters/model_filters_test.py +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/integration/helpers.py +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/integration/linode_client/__init__.py +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/integration/linode_client/test_errors.py +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/integration/linode_client/test_retry.py +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/integration/login_client/test_login_client.py +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/integration/models/__init__.py +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/integration/models/database/helpers.py +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/integration/models/database/test_database.py +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/integration/models/database/test_database_engine_config.py +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/integration/models/firewall/test_firewall.py +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/integration/models/firewall/test_firewall_templates.py +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/integration/models/image/test_image.py +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/integration/models/lock/__init__.py +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/integration/models/lock/test_lock.py +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/integration/models/longview/test_longview.py +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/integration/models/maintenance/test_maintenance.py +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/integration/models/monitor_api/test_monitor_api.py +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/integration/models/object_storage/test_obj.py +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/integration/models/object_storage/test_obj_quotas.py +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/integration/models/profile/test_profile.py +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/integration/models/region/test_region.py +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/integration/models/sharegroups/test_sharegroups.py +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/integration/models/volume/test_blockstorage.py +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/integration/models/volume/test_volume.py +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/unit/__init__.py +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/unit/base.py +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/unit/errors_test.py +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/unit/fixtures.py +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/unit/groups/__init__.py +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/unit/groups/database_test.py +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/unit/groups/image_share_group_test.py +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/unit/groups/image_test.py +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/unit/groups/linode_test.py +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/unit/groups/lke_test.py +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/unit/groups/lke_tier_test.py +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/unit/groups/lock_test.py +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/unit/groups/object_storage_test.py +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/unit/groups/placement_test.py +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/unit/groups/polling_test.py +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/unit/groups/region_test.py +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/unit/login_client_test.py +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/unit/objects/account_test.py +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/unit/objects/base_test.py +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/unit/objects/beta_test.py +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/unit/objects/database_test.py +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/unit/objects/domain_test.py +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/unit/objects/firewall_test.py +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/unit/objects/image_share_group_test.py +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/unit/objects/image_test.py +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/unit/objects/linode_interface_test.py +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/unit/objects/linode_test.py +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/unit/objects/lock_test.py +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/unit/objects/longview_test.py +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/unit/objects/mapped_object_test.py +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/unit/objects/nodebalancers_test.py +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/unit/objects/object_storage_test.py +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/unit/objects/placement_test.py +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/unit/objects/profile_test.py +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/unit/objects/property_alias_test.py +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/unit/objects/region_test.py +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/unit/objects/serializable_test.py +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/unit/objects/support_test.py +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/unit/objects/volume_test.py +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/unit/paginated_list_test.py +0 -0
- {linode_api4-5.44.0 → linode_api4-5.46.0}/test/unit/util_test.py +0 -0
|
@@ -166,6 +166,7 @@ class LinodeGroup(Group):
|
|
|
166
166
|
kernel: Optional[str] = None,
|
|
167
167
|
boot_size: Optional[int] = None,
|
|
168
168
|
authorized_users: Optional[List[str]] = None,
|
|
169
|
+
ipv4: Optional[List[str]] = None,
|
|
169
170
|
**kwargs,
|
|
170
171
|
):
|
|
171
172
|
"""
|
|
@@ -355,6 +356,9 @@ class LinodeGroup(Group):
|
|
|
355
356
|
:param boot_size: The size of the boot disk in MB. If provided, this will be used to create
|
|
356
357
|
the boot disk for the Instance.
|
|
357
358
|
:type boot_size: int
|
|
359
|
+
:param ipv4: A list of reserved IPv4 addresses to assign to this Instance.
|
|
360
|
+
NOTE: Reserved IP feature may not currently be available to all users.
|
|
361
|
+
:type ipv4: list[str]
|
|
358
362
|
|
|
359
363
|
:returns: A new Instance object
|
|
360
364
|
:rtype: Instance
|
|
@@ -401,6 +405,7 @@ class LinodeGroup(Group):
|
|
|
401
405
|
"network_helper": network_helper,
|
|
402
406
|
"kernel": kernel,
|
|
403
407
|
"boot_size": boot_size,
|
|
408
|
+
"ipv4": ipv4,
|
|
404
409
|
}
|
|
405
410
|
|
|
406
411
|
params.update(kwargs)
|
|
@@ -0,0 +1,627 @@
|
|
|
1
|
+
from typing import Any, Optional, Union
|
|
2
|
+
|
|
3
|
+
from linode_api4 import PaginatedList
|
|
4
|
+
from linode_api4.errors import UnexpectedResponseError
|
|
5
|
+
from linode_api4.groups import Group
|
|
6
|
+
from linode_api4.objects import (
|
|
7
|
+
AlertChannel,
|
|
8
|
+
AlertDefinition,
|
|
9
|
+
AlertDefinitionEntity,
|
|
10
|
+
AlertScope,
|
|
11
|
+
LogsDestination,
|
|
12
|
+
LogsDestinationType,
|
|
13
|
+
LogsStream,
|
|
14
|
+
LogsStreamStatus,
|
|
15
|
+
LogsStreamType,
|
|
16
|
+
MonitorDashboard,
|
|
17
|
+
MonitorMetricsDefinition,
|
|
18
|
+
MonitorService,
|
|
19
|
+
MonitorServiceToken,
|
|
20
|
+
)
|
|
21
|
+
from linode_api4.objects.monitor import (
|
|
22
|
+
AkamaiObjectStorageLogsDestinationDetails,
|
|
23
|
+
CustomHTTPSLogsDestinationDetails,
|
|
24
|
+
LogsStreamDetails,
|
|
25
|
+
)
|
|
26
|
+
|
|
27
|
+
__all__ = [
|
|
28
|
+
"MonitorGroup",
|
|
29
|
+
]
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
class MonitorGroup(Group):
|
|
33
|
+
"""
|
|
34
|
+
Encapsulates Monitor-related methods of the :any:`LinodeClient`.
|
|
35
|
+
|
|
36
|
+
This group contains all features beneath the `/monitor` group in the API v4.
|
|
37
|
+
"""
|
|
38
|
+
|
|
39
|
+
def dashboards(
|
|
40
|
+
self, *filters, service_type: Optional[str] = None
|
|
41
|
+
) -> PaginatedList:
|
|
42
|
+
"""
|
|
43
|
+
Returns a list of dashboards. If `service_type` is provided, it fetches dashboards
|
|
44
|
+
for the specific service type. If None, it fetches all dashboards.
|
|
45
|
+
|
|
46
|
+
dashboards = client.monitor.dashboards()
|
|
47
|
+
dashboard = client.load(MonitorDashboard, 1)
|
|
48
|
+
dashboards_by_service = client.monitor.dashboards(service_type="dbaas")
|
|
49
|
+
|
|
50
|
+
API Documentation:
|
|
51
|
+
- All Dashboards: https://techdocs.akamai.com/linode-api/reference/get-dashboards-all
|
|
52
|
+
- Dashboards by Service: https://techdocs.akamai.com/linode-api/reference/get-dashboards
|
|
53
|
+
|
|
54
|
+
:param service_type: The service type to get dashboards for.
|
|
55
|
+
:type service_type: Optional[str]
|
|
56
|
+
:param filters: Any number of filters to apply to this query.
|
|
57
|
+
See :doc:`Filtering Collections</linode_api4/objects/filtering>`
|
|
58
|
+
for more details on filtering.
|
|
59
|
+
|
|
60
|
+
:returns: A list of Dashboards.
|
|
61
|
+
:rtype: PaginatedList of Dashboard
|
|
62
|
+
"""
|
|
63
|
+
endpoint = (
|
|
64
|
+
f"/monitor/services/{service_type}/dashboards"
|
|
65
|
+
if service_type
|
|
66
|
+
else "/monitor/dashboards"
|
|
67
|
+
)
|
|
68
|
+
|
|
69
|
+
return self.client._get_and_filter(
|
|
70
|
+
MonitorDashboard,
|
|
71
|
+
*filters,
|
|
72
|
+
endpoint=endpoint,
|
|
73
|
+
)
|
|
74
|
+
|
|
75
|
+
def services(
|
|
76
|
+
self,
|
|
77
|
+
*filters,
|
|
78
|
+
) -> PaginatedList:
|
|
79
|
+
"""
|
|
80
|
+
Lists services supported by ACLP.
|
|
81
|
+
supported_services = client.monitor.services()
|
|
82
|
+
service_details = client.monitor.load(MonitorService, "dbaas")
|
|
83
|
+
|
|
84
|
+
API Documentation: https://techdocs.akamai.com/linode-api/reference/get-monitor-services
|
|
85
|
+
API Documentation: https://techdocs.akamai.com/linode-api/reference/get-monitor-services-for-service-type
|
|
86
|
+
|
|
87
|
+
:param filters: Any number of filters to apply to this query.
|
|
88
|
+
See :doc:`Filtering Collections</linode_api4/objects/filtering>`
|
|
89
|
+
for more details on filtering.
|
|
90
|
+
|
|
91
|
+
:returns: Lists monitor services
|
|
92
|
+
:rtype: PaginatedList of the Services
|
|
93
|
+
"""
|
|
94
|
+
endpoint = "/monitor/services"
|
|
95
|
+
|
|
96
|
+
return self.client._get_and_filter(
|
|
97
|
+
MonitorService,
|
|
98
|
+
*filters,
|
|
99
|
+
endpoint=endpoint,
|
|
100
|
+
)
|
|
101
|
+
|
|
102
|
+
def metric_definitions(
|
|
103
|
+
self, service_type: str, *filters
|
|
104
|
+
) -> list[MonitorMetricsDefinition]:
|
|
105
|
+
"""
|
|
106
|
+
Returns metrics for a specific service type.
|
|
107
|
+
|
|
108
|
+
metrics = client.monitor.list_metric_definitions(service_type="dbaas")
|
|
109
|
+
|
|
110
|
+
API Documentation: https://techdocs.akamai.com/linode-api/reference/get-monitor-information
|
|
111
|
+
|
|
112
|
+
:param service_type: The service type to get metrics for.
|
|
113
|
+
:type service_type: str
|
|
114
|
+
:param filters: Any number of filters to apply to this query.
|
|
115
|
+
See :doc:`Filtering Collections</linode_api4/objects/filtering>`
|
|
116
|
+
for more details on filtering.
|
|
117
|
+
|
|
118
|
+
:returns: Returns a List of metrics for a service
|
|
119
|
+
:rtype: PaginatedList of metrics
|
|
120
|
+
"""
|
|
121
|
+
return self.client._get_and_filter(
|
|
122
|
+
MonitorMetricsDefinition,
|
|
123
|
+
*filters,
|
|
124
|
+
endpoint=f"/monitor/services/{service_type}/metric-definitions",
|
|
125
|
+
)
|
|
126
|
+
|
|
127
|
+
def create_token(
|
|
128
|
+
self, service_type: str, entity_ids: list[Any]
|
|
129
|
+
) -> MonitorServiceToken:
|
|
130
|
+
"""
|
|
131
|
+
Returns a JWE Token for a specific service type.
|
|
132
|
+
token = client.monitor.create_token(service_type="dbaas", entity_ids=[1234])
|
|
133
|
+
|
|
134
|
+
API Documentation: https://techdocs.akamai.com/linode-api/reference/post-get-token
|
|
135
|
+
|
|
136
|
+
:param service_type: The service type to create token for.
|
|
137
|
+
:type service_type: str
|
|
138
|
+
:param entity_ids: The list of entity IDs for which the token is valid.
|
|
139
|
+
:type entity_ids: any
|
|
140
|
+
|
|
141
|
+
:returns: Returns a token for a service
|
|
142
|
+
:rtype: str
|
|
143
|
+
"""
|
|
144
|
+
|
|
145
|
+
params = {"entity_ids": entity_ids}
|
|
146
|
+
|
|
147
|
+
result = self.client.post(
|
|
148
|
+
f"/monitor/services/{service_type}/token", data=params
|
|
149
|
+
)
|
|
150
|
+
|
|
151
|
+
if "token" not in result:
|
|
152
|
+
raise UnexpectedResponseError(
|
|
153
|
+
"Unexpected response when creating token!", json=result
|
|
154
|
+
)
|
|
155
|
+
return MonitorServiceToken(token=result["token"])
|
|
156
|
+
|
|
157
|
+
def alert_definitions(
|
|
158
|
+
self,
|
|
159
|
+
*filters,
|
|
160
|
+
service_type: Optional[str] = None,
|
|
161
|
+
) -> PaginatedList:
|
|
162
|
+
"""
|
|
163
|
+
Retrieve alert definitions.
|
|
164
|
+
|
|
165
|
+
Returns a paginated collection of :class:`AlertDefinition` objects. If you
|
|
166
|
+
need to obtain a single :class:`AlertDefinition`, use :meth:`LinodeClient.load`
|
|
167
|
+
and supply the `service_type` as the parent identifier, for example:
|
|
168
|
+
|
|
169
|
+
alerts = client.monitor.alert_definitions()
|
|
170
|
+
alerts_by_service = client.monitor.alert_definitions(service_type="dbaas")
|
|
171
|
+
|
|
172
|
+
API Documentation:
|
|
173
|
+
https://techdocs.akamai.com/linode-api/reference/get-alert-definitions
|
|
174
|
+
https://techdocs.akamai.com/linode-api/reference/get-alert-definitions-for-service-type
|
|
175
|
+
|
|
176
|
+
:param service_type: Optional service type to scope the query (e.g. ``"dbaas"``).
|
|
177
|
+
:type service_type: Optional[str]
|
|
178
|
+
:param filters: Optional filtering expressions to apply to the returned
|
|
179
|
+
collection. See :doc:`Filtering Collections</linode_api4/objects/filtering>`.
|
|
180
|
+
|
|
181
|
+
:returns: A paginated list of :class:`AlertDefinition` objects.
|
|
182
|
+
:rtype: PaginatedList[AlertDefinition]
|
|
183
|
+
"""
|
|
184
|
+
|
|
185
|
+
endpoint = "/monitor/alert-definitions"
|
|
186
|
+
if service_type:
|
|
187
|
+
endpoint = f"/monitor/services/{service_type}/alert-definitions"
|
|
188
|
+
|
|
189
|
+
# Requesting a list
|
|
190
|
+
return self.client._get_and_filter(
|
|
191
|
+
AlertDefinition, *filters, endpoint=endpoint
|
|
192
|
+
)
|
|
193
|
+
|
|
194
|
+
def alert_channels(self, *filters) -> PaginatedList:
|
|
195
|
+
"""
|
|
196
|
+
List alert channels for the authenticated account.
|
|
197
|
+
|
|
198
|
+
Returns a paginated collection of :class:`AlertChannel` objects which
|
|
199
|
+
describe destinations for alert notifications (for example: email
|
|
200
|
+
lists, webhooks, PagerDuty, Slack, etc.). By default this method
|
|
201
|
+
returns all channels visible to the authenticated account; you can
|
|
202
|
+
supply optional filter expressions to restrict the results.
|
|
203
|
+
|
|
204
|
+
Examples:
|
|
205
|
+
channels = client.monitor.alert_channels()
|
|
206
|
+
|
|
207
|
+
API Documentation: https://techdocs.akamai.com/linode-api/reference/get-notification-channels
|
|
208
|
+
|
|
209
|
+
:param filters: Optional filter expressions to apply to the collection.
|
|
210
|
+
See :doc:`Filtering Collections</linode_api4/objects/filtering>` for details.
|
|
211
|
+
:returns: A paginated list of :class:`AlertChannel` objects.
|
|
212
|
+
:rtype: PaginatedList[AlertChannel]
|
|
213
|
+
"""
|
|
214
|
+
return self.client._get_and_filter(AlertChannel, *filters)
|
|
215
|
+
|
|
216
|
+
def create_alert_definition(
|
|
217
|
+
self,
|
|
218
|
+
service_type: str,
|
|
219
|
+
label: str,
|
|
220
|
+
severity: int,
|
|
221
|
+
channel_ids: list[int],
|
|
222
|
+
rule_criteria: dict,
|
|
223
|
+
trigger_conditions: dict,
|
|
224
|
+
entity_ids: Optional[list[str]] = None,
|
|
225
|
+
description: Optional[str] = None,
|
|
226
|
+
scope: Optional[Union[AlertScope, str]] = None,
|
|
227
|
+
regions: Optional[list[str]] = None,
|
|
228
|
+
group_by: Optional[list[str]] = None,
|
|
229
|
+
) -> AlertDefinition:
|
|
230
|
+
"""
|
|
231
|
+
Create a new alert definition for a given service type.
|
|
232
|
+
|
|
233
|
+
The alert definition configures when alerts are fired and which channels
|
|
234
|
+
are notified.
|
|
235
|
+
|
|
236
|
+
API Documentation: https://techdocs.akamai.com/linode-api/reference/post-alert-definition-for-service-type
|
|
237
|
+
|
|
238
|
+
:param service_type: Service type for which to create the alert definition
|
|
239
|
+
(e.g. ``"dbaas"``).
|
|
240
|
+
:type service_type: str
|
|
241
|
+
:param label: Human-readable label for the alert definition.
|
|
242
|
+
:type label: str
|
|
243
|
+
:param severity: Severity level for the alert (numeric severity used by API).
|
|
244
|
+
:type severity: int
|
|
245
|
+
:param channel_ids: List of alert channel IDs to notify when the alert fires.
|
|
246
|
+
:type channel_ids: list[int]
|
|
247
|
+
:param rule_criteria: Rule criteria that determine when the alert
|
|
248
|
+
should be evaluated. Structure depends on the service
|
|
249
|
+
metric definitions.
|
|
250
|
+
:type rule_criteria: dict
|
|
251
|
+
:param trigger_conditions: Trigger conditions that define when
|
|
252
|
+
the alert should transition state.
|
|
253
|
+
:type trigger_conditions: dict
|
|
254
|
+
:param entity_ids: (Optional) Restrict the alert to a subset of entity IDs.
|
|
255
|
+
:type entity_ids: Optional[list[str]]
|
|
256
|
+
:param description: (Optional) Longer description for the alert definition.
|
|
257
|
+
:type description: Optional[str]
|
|
258
|
+
:param scope: (Optional) Alert scope (for example: `account`, `entity`, or `region`). Defaults to `entity`.
|
|
259
|
+
:type scope: Optional[Union[AlertScope, str]]
|
|
260
|
+
:param regions: (Optional) Regions to monitor.
|
|
261
|
+
:type regions: Optional[list[str]]
|
|
262
|
+
:param group_by: (Optional) Aggregates metric data by dimension so that alert conditions are evaluated independently for each dimension value.
|
|
263
|
+
:type group_by: Optional[list[str]]
|
|
264
|
+
|
|
265
|
+
:returns: The newly created :class:`AlertDefinition`.
|
|
266
|
+
:rtype: AlertDefinition
|
|
267
|
+
|
|
268
|
+
.. note::
|
|
269
|
+
For updating an alert definition, use the ``save()`` method on the :class:`AlertDefinition` object.
|
|
270
|
+
For deleting an alert definition, use the ``delete()`` method directly on the :class:`AlertDefinition` object.
|
|
271
|
+
"""
|
|
272
|
+
params = {
|
|
273
|
+
"label": label,
|
|
274
|
+
"severity": severity,
|
|
275
|
+
"channel_ids": channel_ids,
|
|
276
|
+
"rule_criteria": rule_criteria,
|
|
277
|
+
"trigger_conditions": trigger_conditions,
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
if entity_ids is not None:
|
|
281
|
+
params["entity_ids"] = entity_ids
|
|
282
|
+
if description is not None:
|
|
283
|
+
params["description"] = description
|
|
284
|
+
if scope is not None:
|
|
285
|
+
params["scope"] = scope
|
|
286
|
+
if regions is not None:
|
|
287
|
+
params["regions"] = regions
|
|
288
|
+
if group_by is not None:
|
|
289
|
+
params["group_by"] = group_by
|
|
290
|
+
|
|
291
|
+
# API will validate service_type and return an error if missing
|
|
292
|
+
result = self.client.post(
|
|
293
|
+
f"/monitor/services/{service_type}/alert-definitions", data=params
|
|
294
|
+
)
|
|
295
|
+
|
|
296
|
+
if "id" not in result:
|
|
297
|
+
raise UnexpectedResponseError(
|
|
298
|
+
"Unexpected response when creating alert definition!",
|
|
299
|
+
json=result,
|
|
300
|
+
)
|
|
301
|
+
|
|
302
|
+
return AlertDefinition(self.client, result["id"], service_type, result)
|
|
303
|
+
|
|
304
|
+
def clone_alert_definition(
|
|
305
|
+
self,
|
|
306
|
+
service_type: str,
|
|
307
|
+
id: int,
|
|
308
|
+
label: str,
|
|
309
|
+
description: Optional[str] = None,
|
|
310
|
+
scope: Optional[Union[AlertScope, str]] = None,
|
|
311
|
+
regions: Optional[list[str]] = None,
|
|
312
|
+
entity_ids: Optional[list[str]] = None,
|
|
313
|
+
severity: Optional[int] = None,
|
|
314
|
+
rule_criteria: Optional[dict] = None,
|
|
315
|
+
trigger_conditions: Optional[dict] = None,
|
|
316
|
+
channel_ids: Optional[list[int]] = None,
|
|
317
|
+
group_by: Optional[list[str]] = None,
|
|
318
|
+
) -> AlertDefinition:
|
|
319
|
+
"""
|
|
320
|
+
Clone an existing alert definition for a given service type.
|
|
321
|
+
The clone request creates a new alert definition based on the source
|
|
322
|
+
definition identified by ``id``.
|
|
323
|
+
|
|
324
|
+
API Documentation: TODO
|
|
325
|
+
|
|
326
|
+
:param service_type: Service type for the source alert definition
|
|
327
|
+
(e.g. ``"dbaas"``).
|
|
328
|
+
:type service_type: str
|
|
329
|
+
:param id: Source alert definition identifier.
|
|
330
|
+
:type id: int (Alert identifier)
|
|
331
|
+
:param label: Human-readable label for the cloned alert definition.
|
|
332
|
+
This value is mandatory and must be unique.
|
|
333
|
+
:type label: str
|
|
334
|
+
:param description: (Optional) Longer description for the cloned alert definition.
|
|
335
|
+
:type description: Optional[str]
|
|
336
|
+
:param scope: (Optional) Alert scope provided in the clone request.
|
|
337
|
+
Scope is inherited from the source alert and is immutable.
|
|
338
|
+
:type scope: Optional[Union[AlertScope, str]]
|
|
339
|
+
:param regions: (Optional) Regions to monitor.
|
|
340
|
+
:type regions: Optional[list[str]]
|
|
341
|
+
:param entity_ids: (Optional) Restrict the alert to a subset of entity IDs.
|
|
342
|
+
:type entity_ids: Optional[list[str]]
|
|
343
|
+
:param severity: (Optional) Severity level for the alert.
|
|
344
|
+
:type severity: Optional[int]
|
|
345
|
+
:param rule_criteria: (Optional) Rule criteria used to evaluate the alert.
|
|
346
|
+
:type rule_criteria: Optional[dict]
|
|
347
|
+
:param trigger_conditions: (Optional) Trigger conditions for alert state transitions.
|
|
348
|
+
:type trigger_conditions: Optional[dict]
|
|
349
|
+
:param channel_ids: (Optional) List of alert channel IDs to notify.
|
|
350
|
+
:type channel_ids: Optional[list[int]]
|
|
351
|
+
:param group_by: (Optional) Aggregates metric data by dimension so that alert conditions are evaluated independently for each dimension value.
|
|
352
|
+
:type group_by: Optional[list[str]]
|
|
353
|
+
|
|
354
|
+
:returns: The newly created cloned :class:`AlertDefinition`.
|
|
355
|
+
:rtype: AlertDefinition
|
|
356
|
+
"""
|
|
357
|
+
params = {
|
|
358
|
+
"label": label,
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
if description is not None:
|
|
362
|
+
params["description"] = description
|
|
363
|
+
if scope is not None:
|
|
364
|
+
params["scope"] = scope
|
|
365
|
+
if regions is not None:
|
|
366
|
+
params["regions"] = regions
|
|
367
|
+
if entity_ids is not None:
|
|
368
|
+
params["entity_ids"] = entity_ids
|
|
369
|
+
if severity is not None:
|
|
370
|
+
params["severity"] = severity
|
|
371
|
+
if rule_criteria is not None:
|
|
372
|
+
params["rule_criteria"] = rule_criteria
|
|
373
|
+
if trigger_conditions is not None:
|
|
374
|
+
params["trigger_conditions"] = trigger_conditions
|
|
375
|
+
if channel_ids is not None:
|
|
376
|
+
params["channel_ids"] = channel_ids
|
|
377
|
+
if group_by is not None:
|
|
378
|
+
params["group_by"] = group_by
|
|
379
|
+
|
|
380
|
+
result = self.client.post(
|
|
381
|
+
f"/monitor/services/{service_type}/alert-definitions/{id}/clone",
|
|
382
|
+
data=params,
|
|
383
|
+
)
|
|
384
|
+
|
|
385
|
+
if "id" not in result:
|
|
386
|
+
raise UnexpectedResponseError(
|
|
387
|
+
"Unexpected response when cloning alert definition!",
|
|
388
|
+
json=result,
|
|
389
|
+
)
|
|
390
|
+
|
|
391
|
+
return AlertDefinition(self.client, result["id"], service_type, result)
|
|
392
|
+
|
|
393
|
+
def alert_definition_entities(
|
|
394
|
+
self,
|
|
395
|
+
service_type: str,
|
|
396
|
+
id: int,
|
|
397
|
+
*filters,
|
|
398
|
+
) -> PaginatedList:
|
|
399
|
+
"""
|
|
400
|
+
List entities associated with a specific alert definition.
|
|
401
|
+
|
|
402
|
+
This endpoint supports pagination fields (`page`, `page_size`) in the API.
|
|
403
|
+
|
|
404
|
+
API Documentation: https://techdocs.akamai.com/linode-api/reference/get-alert-definition-entities
|
|
405
|
+
|
|
406
|
+
:param service_type: Service type for the alert definition (e.g. `dbaas`).
|
|
407
|
+
:type service_type: str
|
|
408
|
+
:param id: Alert definition identifier.
|
|
409
|
+
:type id: int
|
|
410
|
+
:param filters: Optional filter expressions to apply to the collection.
|
|
411
|
+
See :doc:`Filtering Collections</linode_api4/objects/filtering>`.
|
|
412
|
+
|
|
413
|
+
:returns: A paginated list of entities associated with the alert definition.
|
|
414
|
+
:rtype: PaginatedList[AlertDefinitionEntity]
|
|
415
|
+
"""
|
|
416
|
+
|
|
417
|
+
endpoint = (
|
|
418
|
+
f"/monitor/services/{service_type}/alert-definitions/{id}/entities"
|
|
419
|
+
)
|
|
420
|
+
return self.client._get_and_filter(
|
|
421
|
+
AlertDefinitionEntity,
|
|
422
|
+
*filters,
|
|
423
|
+
endpoint=endpoint,
|
|
424
|
+
)
|
|
425
|
+
|
|
426
|
+
def destinations(self, *filters) -> PaginatedList:
|
|
427
|
+
"""
|
|
428
|
+
List available logs destinations.
|
|
429
|
+
|
|
430
|
+
Returns a paginated collection of :class:`LogsDestination` objects which
|
|
431
|
+
describe logs destinations. By default, this method returns all available
|
|
432
|
+
destinations; you can supply optional filter expressions to restrict
|
|
433
|
+
the results, for example::
|
|
434
|
+
|
|
435
|
+
# Get destinations created by username and with id 111
|
|
436
|
+
destinations = client.monitor.destinations(LogsDestination.created_by == "username",
|
|
437
|
+
LogsDestination.id == 111)
|
|
438
|
+
|
|
439
|
+
API Documentation: https://techdocs.akamai.com/linode-api/reference/get-destinations
|
|
440
|
+
|
|
441
|
+
:param filters: Any number of filters to apply to this query.
|
|
442
|
+
See :doc:`Filtering Collections</linode_api4/objects/filtering>`
|
|
443
|
+
for more details on filtering.
|
|
444
|
+
|
|
445
|
+
:returns: A list of :class:`LogsDestination` objects matching the query.
|
|
446
|
+
:rtype: PaginatedList of LogsDestination
|
|
447
|
+
"""
|
|
448
|
+
|
|
449
|
+
return self.client._get_and_filter(LogsDestination, *filters)
|
|
450
|
+
|
|
451
|
+
def destination_create(
|
|
452
|
+
self,
|
|
453
|
+
label: str,
|
|
454
|
+
type: Union[LogsDestinationType, str],
|
|
455
|
+
details: Union[
|
|
456
|
+
AkamaiObjectStorageLogsDestinationDetails,
|
|
457
|
+
CustomHTTPSLogsDestinationDetails,
|
|
458
|
+
],
|
|
459
|
+
) -> LogsDestination:
|
|
460
|
+
"""
|
|
461
|
+
Creates a new :any:`LogsDestination` for logs on this account.
|
|
462
|
+
|
|
463
|
+
For an ``akamai_object_storage`` destination::
|
|
464
|
+
|
|
465
|
+
client = LinodeClient(TOKEN)
|
|
466
|
+
|
|
467
|
+
new_destination = client.monitor.destination_create(
|
|
468
|
+
label="OBJ_logs_destination",
|
|
469
|
+
type="akamai_object_storage",
|
|
470
|
+
details=AkamaiObjectStorageLogsDestinationDetails(
|
|
471
|
+
access_key_id="1ABCD23EFG4HIJKLMNO5",
|
|
472
|
+
access_key_secret="1aB2CD3e4fgHi5JK6lmnop7qR8STU9VxYzabcdefHh",
|
|
473
|
+
bucket_name="primary-bucket",
|
|
474
|
+
host="primary-bucket-1.us-east-12.linodeobjects.com",
|
|
475
|
+
path="audit-logs",
|
|
476
|
+
)
|
|
477
|
+
)
|
|
478
|
+
|
|
479
|
+
For a ``custom_https`` destination::
|
|
480
|
+
|
|
481
|
+
new_destination = client.monitor.destination_create(
|
|
482
|
+
label="custom_logs_destination",
|
|
483
|
+
type="custom_https",
|
|
484
|
+
details=CustomHTTPSLogsDestinationDetails(
|
|
485
|
+
endpoint_url="https://my-site.com/log-storage/basicAuth",
|
|
486
|
+
authentication=DestinationAuthentication(
|
|
487
|
+
type="basic",
|
|
488
|
+
details=BasicAuthenticationDetails(
|
|
489
|
+
basic_authentication_user="user",
|
|
490
|
+
basic_authentication_password="pass",
|
|
491
|
+
),
|
|
492
|
+
),
|
|
493
|
+
data_compression="gzip",
|
|
494
|
+
content_type="application/json",
|
|
495
|
+
)
|
|
496
|
+
)
|
|
497
|
+
|
|
498
|
+
API Documentation: https://techdocs.akamai.com/linode-api/reference/post-destination
|
|
499
|
+
|
|
500
|
+
:param label: The name for this logs destination.
|
|
501
|
+
:type label: str
|
|
502
|
+
:param type: The type of destination — ``akamai_object_storage`` or ``custom_https``.
|
|
503
|
+
:type type: str or LogsDestinationType
|
|
504
|
+
:param details: A typed details object matching the destination type.
|
|
505
|
+
Use :class:`AkamaiObjectStorageLogsDestinationDetails` for
|
|
506
|
+
``akamai_object_storage`` or :class:`CustomHTTPSLogsDestinationDetails`
|
|
507
|
+
for ``custom_https``.
|
|
508
|
+
:type details: AkamaiObjectStorageLogsDestinationDetails or CustomHTTPSLogsDestinationDetails
|
|
509
|
+
|
|
510
|
+
:returns: The newly created logs destination.
|
|
511
|
+
:rtype: LogsDestination
|
|
512
|
+
"""
|
|
513
|
+
|
|
514
|
+
params = {
|
|
515
|
+
"label": label,
|
|
516
|
+
"type": type,
|
|
517
|
+
"details": details.dict,
|
|
518
|
+
}
|
|
519
|
+
|
|
520
|
+
result = self.client.post("/monitor/streams/destinations", data=params)
|
|
521
|
+
|
|
522
|
+
if "id" not in result:
|
|
523
|
+
raise UnexpectedResponseError(
|
|
524
|
+
"Unexpected response when creating destination!",
|
|
525
|
+
json=result,
|
|
526
|
+
)
|
|
527
|
+
|
|
528
|
+
return LogsDestination(self.client, result["id"], result)
|
|
529
|
+
|
|
530
|
+
def streams(self, *filters) -> PaginatedList:
|
|
531
|
+
"""
|
|
532
|
+
List available logs streams.
|
|
533
|
+
|
|
534
|
+
Returns a paginated collection of :class:`LogsStream` objects which
|
|
535
|
+
describe logs streams. By default, this method returns all available
|
|
536
|
+
streams; you can supply optional filter expressions to restrict
|
|
537
|
+
the results, for example::
|
|
538
|
+
|
|
539
|
+
# Get all streams with status ``provisioning``
|
|
540
|
+
provisioning_streams = client.monitor.streams(LogsStream.status == "provisioning")
|
|
541
|
+
|
|
542
|
+
API Documentation: https://techdocs.akamai.com/linode-api/reference/get-streams
|
|
543
|
+
|
|
544
|
+
:param filters: Any number of filters to apply to this query.
|
|
545
|
+
See :doc:`Filtering Collections</linode_api4/objects/filtering>`
|
|
546
|
+
for more details on filtering.
|
|
547
|
+
:returns: A list of :class:`LogsStream` objects matching the query.
|
|
548
|
+
:rtype: PaginatedList of LogsStream
|
|
549
|
+
"""
|
|
550
|
+
|
|
551
|
+
return self.client._get_and_filter(LogsStream, *filters)
|
|
552
|
+
|
|
553
|
+
def stream_create(
|
|
554
|
+
self,
|
|
555
|
+
destinations: list[int],
|
|
556
|
+
label: str,
|
|
557
|
+
type: Union[LogsStreamType, str],
|
|
558
|
+
status: Optional[Union[LogsStreamStatus, str]] = None,
|
|
559
|
+
details: Optional[LogsStreamDetails] = None,
|
|
560
|
+
) -> LogsStream:
|
|
561
|
+
"""
|
|
562
|
+
Creates a new :any:`LogsStream` for logs on this account. For example::
|
|
563
|
+
|
|
564
|
+
client = LinodeClient(TOKEN)
|
|
565
|
+
|
|
566
|
+
# audit_logs stream (no details required)
|
|
567
|
+
new_stream = client.monitor.stream_create(
|
|
568
|
+
destinations=[1234],
|
|
569
|
+
label="Linode_services",
|
|
570
|
+
status="active",
|
|
571
|
+
type="audit_logs"
|
|
572
|
+
)
|
|
573
|
+
|
|
574
|
+
# lke_audit_logs stream with specific clusters
|
|
575
|
+
lke_stream = client.monitor.stream_create(
|
|
576
|
+
destinations=[1234],
|
|
577
|
+
label="LKE_audit_stream",
|
|
578
|
+
type="lke_audit_logs",
|
|
579
|
+
details=LogsStreamDetails(
|
|
580
|
+
cluster_ids=[1111, 2222],
|
|
581
|
+
is_auto_add_all_clusters_enabled=False,
|
|
582
|
+
)
|
|
583
|
+
)
|
|
584
|
+
|
|
585
|
+
API Documentation: https://techdocs.akamai.com/linode-api/reference/post-stream
|
|
586
|
+
|
|
587
|
+
:param destinations: The unique identifier for the sync point that will receive logs data.
|
|
588
|
+
Run the List destinations operation and store the id values for each applicable destination.
|
|
589
|
+
At the moment only single destination is supported.
|
|
590
|
+
:type destinations: list[int]
|
|
591
|
+
:param label: The name of the stream. This is used for display purposes in Akamai Cloud Manager.
|
|
592
|
+
:type label: str
|
|
593
|
+
:param type: The type of stream — ``audit_logs`` for Linode control plane logs,
|
|
594
|
+
or ``lke_audit_logs`` for LKE enterprise cluster audit logs.
|
|
595
|
+
:type type: str or LogsStreamType
|
|
596
|
+
:param status: (Optional) The availability status of the stream. Possible values are: ``active``, ``inactive``.
|
|
597
|
+
Defaults to ``active``.
|
|
598
|
+
:type status: str
|
|
599
|
+
:param details: (Optional) Additional stream details. Only applicable for
|
|
600
|
+
``lke_audit_logs`` streams. Omit for ``audit_logs`` streams.
|
|
601
|
+
:type details: LogsStreamDetails
|
|
602
|
+
|
|
603
|
+
:returns: The newly created logs stream.
|
|
604
|
+
:rtype: LogsStream
|
|
605
|
+
"""
|
|
606
|
+
|
|
607
|
+
params = {
|
|
608
|
+
"label": label,
|
|
609
|
+
"type": type,
|
|
610
|
+
"destinations": destinations,
|
|
611
|
+
}
|
|
612
|
+
|
|
613
|
+
if status is not None:
|
|
614
|
+
params["status"] = status
|
|
615
|
+
|
|
616
|
+
if details is not None:
|
|
617
|
+
params["details"] = details.dict
|
|
618
|
+
|
|
619
|
+
result = self.client.post("/monitor/streams", data=params)
|
|
620
|
+
|
|
621
|
+
if "id" not in result:
|
|
622
|
+
raise UnexpectedResponseError(
|
|
623
|
+
"Unexpected response when creating logs stream!",
|
|
624
|
+
json=result,
|
|
625
|
+
)
|
|
626
|
+
|
|
627
|
+
return LogsStream(self.client, result["id"], result)
|