From 93d975132e889c453b105810ecdc06533f8a34a2 Mon Sep 17 00:00:00 2001 From: SDK Generator Bot Date: Mon, 22 Sep 2025 08:54:14 +0000 Subject: [PATCH] Generate iaas --- services/iaas/src/stackit/iaas/__init__.py | 196 +- .../iaas/src/stackit/iaas/api/default_api.py | 21158 +++++++++++----- services/iaas/src/stackit/iaas/api_client.py | 2 +- .../iaas/src/stackit/iaas/configuration.py | 9 +- services/iaas/src/stackit/iaas/exceptions.py | 2 +- .../iaas/src/stackit/iaas/models/__init__.py | 101 +- .../add_routes_to_routing_table_payload.py | 93 + .../add_routing_table_to_area_payload.py | 157 + .../models/add_volume_to_server_payload.py | 2 +- .../src/stackit/iaas/models/affinity_group.py | 2 +- .../models/affinity_group_list_response.py | 2 +- .../iaas/models/allowed_addresses_inner.py | 2 +- .../iaas/src/stackit/iaas/models/area_id.py | 2 +- .../models/availability_zone_list_response.py | 2 +- .../iaas/src/stackit/iaas/models/backup.py | 4 +- .../iaas/models/backup_list_response.py | 2 +- .../src/stackit/iaas/models/backup_source.py | 2 +- .../iaas/models/base_security_group_rule.py | 17 +- .../src/stackit/iaas/models/boot_volume.py | 2 +- .../stackit/iaas/models/boot_volume_source.py | 2 +- .../models/create_affinity_group_payload.py | 2 +- .../iaas/models/create_backup_payload.py | 4 +- .../iaas/models/create_image_payload.py | 4 +- .../iaas/models/create_key_pair_payload.py | 4 +- .../create_management_network_payload.py | 97 + ...create_management_network_route_payload.py | 99 + .../models/create_network_area_payload.py | 42 +- .../create_network_area_range_payload.py | 2 +- .../create_network_area_route_payload.py | 18 +- .../iaas/models/create_network_ipv4.py | 155 + .../models/create_network_ipv4_with_prefix.py | 124 + .../create_network_ipv4_with_prefix_length.py | 85 + .../iaas/models/create_network_ipv6.py | 155 + .../models/create_network_ipv6_with_prefix.py | 124 + .../create_network_ipv6_with_prefix_length.py | 85 + .../iaas/models/create_network_payload.py | 44 +- .../stackit/iaas/models/create_nic_payload.py | 9 +- .../stackit/iaas/models/create_protocol.py | 2 +- .../iaas/models/create_public_ip_payload.py | 10 +- .../models/create_security_group_payload.py | 4 +- .../create_security_group_rule_payload.py | 17 +- .../create_security_group_rule_protocol.py | 2 +- .../iaas/models/create_server_networking.py | 2 +- .../create_server_networking_with_nics.py | 2 +- .../iaas/models/create_server_payload.py | 21 +- ...create_server_payload_all_of_networking.py | 151 + .../iaas/models/create_volume_payload.py | 4 +- .../stackit/iaas/models/destination_cidrv4.py | 96 + .../stackit/iaas/models/destination_cidrv6.py | 96 + .../iaas/src/stackit/iaas/models/error.py | 2 +- .../iaas/models/get_server_log200_response.py | 2 +- .../stackit/iaas/models/icmp_parameters.py | 2 +- .../iaas/src/stackit/iaas/models/image.py | 4 +- .../src/stackit/iaas/models/image_agent.py | 2 +- .../src/stackit/iaas/models/image_checksum.py | 2 +- .../src/stackit/iaas/models/image_config.py | 2 +- .../iaas/models/image_create_response.py | 2 +- .../iaas/models/image_list_response.py | 2 +- .../src/stackit/iaas/models/image_share.py | 2 +- .../iaas/models/image_share_consumer.py | 2 +- .../iaas/models/key_pair_list_response.py | 2 +- .../iaas/src/stackit/iaas/models/keypair.py | 4 +- .../src/stackit/iaas/models/machine_type.py | 2 +- .../iaas/models/machine_type_list_response.py | 2 +- .../stackit/iaas/models/management_route.py | 141 + .../models/management_route_destination.py | 96 + .../models/management_route_list_response.py | 99 + .../iaas/models/management_route_nexthop.py | 96 + .../iaas/src/stackit/iaas/models/network.py | 130 +- .../src/stackit/iaas/models/network_area.py | 51 +- .../iaas/models/network_area_list_response.py | 2 +- .../src/stackit/iaas/models/network_ipv4.py | 140 + .../src/stackit/iaas/models/network_ipv6.py | 112 + .../iaas/models/network_list_response.py | 2 +- .../src/stackit/iaas/models/network_range.py | 16 +- .../models/network_range_list_response.py | 2 +- .../stackit/iaas/models/nexthop_blackhole.py | 82 + .../stackit/iaas/models/nexthop_internet.py | 82 + .../src/stackit/iaas/models/nexthop_ipv4.py | 96 + .../src/stackit/iaas/models/nexthop_ipv6.py | 96 + services/iaas/src/stackit/iaas/models/nic.py | 9 +- .../stackit/iaas/models/nic_list_response.py | 2 +- .../partial_update_network_area_payload.py | 45 +- .../models/partial_update_network_payload.py | 44 +- .../src/stackit/iaas/models/port_range.py | 2 +- .../iaas/src/stackit/iaas/models/project.py | 46 +- .../iaas/models/project_list_response.py | 2 +- .../iaas/src/stackit/iaas/models/protocol.py | 2 +- .../iaas/src/stackit/iaas/models/public_ip.py | 10 +- .../iaas/models/public_ip_list_response.py | 2 +- .../src/stackit/iaas/models/public_network.py | 9 +- .../models/public_network_list_response.py | 2 +- .../iaas/src/stackit/iaas/models/quota.py | 2 +- .../src/stackit/iaas/models/quota_list.py | 2 +- .../iaas/models/quota_list_response.py | 2 +- .../src/stackit/iaas/models/regional_area.py | 101 + .../stackit/iaas/models/regional_area_ipv4.py | 141 + .../models/regional_area_list_response.py | 99 + .../iaas/src/stackit/iaas/models/request.py | 2 +- .../stackit/iaas/models/request_resource.py | 2 +- .../iaas/models/rescue_server_payload.py | 2 +- .../iaas/models/resize_server_payload.py | 2 +- .../iaas/models/resize_volume_payload.py | 2 +- .../iaas/src/stackit/iaas/models/route.py | 63 +- .../stackit/iaas/models/route_destination.py | 151 + .../iaas/models/route_list_response.py | 2 +- .../src/stackit/iaas/models/route_nexthop.py | 179 + .../src/stackit/iaas/models/routing_table.py | 157 + .../models/routing_table_list_response.py | 97 + .../src/stackit/iaas/models/security_group.py | 4 +- .../models/security_group_list_response.py | 2 +- .../iaas/models/security_group_rule.py | 17 +- .../security_group_rule_list_response.py | 2 +- .../models/security_group_rule_protocol.py | 2 +- .../iaas/src/stackit/iaas/models/server.py | 21 +- .../src/stackit/iaas/models/server_agent.py | 85 + .../stackit/iaas/models/server_console_url.py | 2 +- .../iaas/models/server_list_response.py | 2 +- .../stackit/iaas/models/server_maintenance.py | 2 +- .../src/stackit/iaas/models/server_network.py | 2 +- .../stackit/iaas/models/server_networking.py | 151 + .../service_account_mail_list_response.py | 2 +- .../iaas/models/set_image_share_payload.py | 2 +- .../iaas/src/stackit/iaas/models/snapshot.py | 4 +- .../iaas/models/snapshot_list_response.py | 2 +- .../src/stackit/iaas/models/static_area_id.py | 2 +- .../models/update_attached_volume_payload.py | 2 +- .../iaas/models/update_image_payload.py | 4 +- .../iaas/models/update_image_share_payload.py | 2 +- .../iaas/models/update_key_pair_payload.py | 4 +- ...update_management_network_route_payload.py | 85 + .../iaas/models/update_network_ipv4_body.py | 8 +- .../iaas/models/update_network_ipv6_body.py | 8 +- .../stackit/iaas/models/update_nic_payload.py | 17 +- .../iaas/models/update_public_ip_payload.py | 10 +- .../iaas/models/update_regional_area_ipv4.py | 102 + .../update_route_of_routing_table_payload.py | 85 + .../update_routing_table_of_area_payload.py | 104 + .../iaas/models/update_server_payload.py | 4 +- .../iaas/models/update_volume_payload.py | 4 +- ...1_configure_network_area_region_payload.py | 101 + .../models/v2beta1_create_snapshot_payload.py | 162 + .../models/v2beta1_update_backup_payload.py | 202 + ...eta1_update_network_area_region_payload.py | 89 + .../v2beta1_update_route_of_area_payload.py | 85 + .../v2beta1_update_security_group_payload.py | 104 + .../models/v2beta1_update_snapshot_payload.py | 99 + .../iaas/src/stackit/iaas/models/volume.py | 4 +- .../stackit/iaas/models/volume_attachment.py | 2 +- .../models/volume_attachment_list_response.py | 2 +- .../models/volume_encryption_parameter.py | 2 +- .../iaas/models/volume_list_response.py | 2 +- .../iaas/models/volume_performance_class.py | 4 +- .../volume_performance_class_list_response.py | 2 +- .../src/stackit/iaas/models/volume_source.py | 2 +- services/iaas/src/stackit/iaas/rest.py | 2 +- 156 files changed, 20090 insertions(+), 7194 deletions(-) create mode 100644 services/iaas/src/stackit/iaas/models/add_routes_to_routing_table_payload.py create mode 100644 services/iaas/src/stackit/iaas/models/add_routing_table_to_area_payload.py create mode 100644 services/iaas/src/stackit/iaas/models/create_management_network_payload.py create mode 100644 services/iaas/src/stackit/iaas/models/create_management_network_route_payload.py create mode 100644 services/iaas/src/stackit/iaas/models/create_network_ipv4.py create mode 100644 services/iaas/src/stackit/iaas/models/create_network_ipv4_with_prefix.py create mode 100644 services/iaas/src/stackit/iaas/models/create_network_ipv4_with_prefix_length.py create mode 100644 services/iaas/src/stackit/iaas/models/create_network_ipv6.py create mode 100644 services/iaas/src/stackit/iaas/models/create_network_ipv6_with_prefix.py create mode 100644 services/iaas/src/stackit/iaas/models/create_network_ipv6_with_prefix_length.py create mode 100644 services/iaas/src/stackit/iaas/models/create_server_payload_all_of_networking.py create mode 100644 services/iaas/src/stackit/iaas/models/destination_cidrv4.py create mode 100644 services/iaas/src/stackit/iaas/models/destination_cidrv6.py create mode 100644 services/iaas/src/stackit/iaas/models/management_route.py create mode 100644 services/iaas/src/stackit/iaas/models/management_route_destination.py create mode 100644 services/iaas/src/stackit/iaas/models/management_route_list_response.py create mode 100644 services/iaas/src/stackit/iaas/models/management_route_nexthop.py create mode 100644 services/iaas/src/stackit/iaas/models/network_ipv4.py create mode 100644 services/iaas/src/stackit/iaas/models/network_ipv6.py create mode 100644 services/iaas/src/stackit/iaas/models/nexthop_blackhole.py create mode 100644 services/iaas/src/stackit/iaas/models/nexthop_internet.py create mode 100644 services/iaas/src/stackit/iaas/models/nexthop_ipv4.py create mode 100644 services/iaas/src/stackit/iaas/models/nexthop_ipv6.py create mode 100644 services/iaas/src/stackit/iaas/models/regional_area.py create mode 100644 services/iaas/src/stackit/iaas/models/regional_area_ipv4.py create mode 100644 services/iaas/src/stackit/iaas/models/regional_area_list_response.py create mode 100644 services/iaas/src/stackit/iaas/models/route_destination.py create mode 100644 services/iaas/src/stackit/iaas/models/route_nexthop.py create mode 100644 services/iaas/src/stackit/iaas/models/routing_table.py create mode 100644 services/iaas/src/stackit/iaas/models/routing_table_list_response.py create mode 100644 services/iaas/src/stackit/iaas/models/server_agent.py create mode 100644 services/iaas/src/stackit/iaas/models/server_networking.py create mode 100644 services/iaas/src/stackit/iaas/models/update_management_network_route_payload.py create mode 100644 services/iaas/src/stackit/iaas/models/update_regional_area_ipv4.py create mode 100644 services/iaas/src/stackit/iaas/models/update_route_of_routing_table_payload.py create mode 100644 services/iaas/src/stackit/iaas/models/update_routing_table_of_area_payload.py create mode 100644 services/iaas/src/stackit/iaas/models/v2beta1_configure_network_area_region_payload.py create mode 100644 services/iaas/src/stackit/iaas/models/v2beta1_create_snapshot_payload.py create mode 100644 services/iaas/src/stackit/iaas/models/v2beta1_update_backup_payload.py create mode 100644 services/iaas/src/stackit/iaas/models/v2beta1_update_network_area_region_payload.py create mode 100644 services/iaas/src/stackit/iaas/models/v2beta1_update_route_of_area_payload.py create mode 100644 services/iaas/src/stackit/iaas/models/v2beta1_update_security_group_payload.py create mode 100644 services/iaas/src/stackit/iaas/models/v2beta1_update_snapshot_payload.py diff --git a/services/iaas/src/stackit/iaas/__init__.py b/services/iaas/src/stackit/iaas/__init__.py index e9f002e2..bafca3d7 100644 --- a/services/iaas/src/stackit/iaas/__init__.py +++ b/services/iaas/src/stackit/iaas/__init__.py @@ -7,7 +7,7 @@ This API allows you to create and modify IaaS resources. - The version of the OpenAPI document: 1 + The version of the OpenAPI document: 2beta1 Contact: stackit-iaas@mail.schwarz Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -29,14 +29,13 @@ "ApiKeyError", "ApiAttributeError", "ApiException", + "AddRoutesToRoutingTablePayload", + "AddRoutingTableToAreaPayload", "AddVolumeToServerPayload", "AffinityGroup", "AffinityGroupListResponse", "AllowedAddressesInner", - "Area", - "AreaConfig", "AreaId", - "AreaPrefixConfigIPv4", "AvailabilityZoneListResponse", "Backup", "BackupListResponse", @@ -45,17 +44,20 @@ "BootVolume", "BootVolumeSource", "CreateAffinityGroupPayload", - "CreateAreaAddressFamily", - "CreateAreaIPv4", "CreateBackupPayload", "CreateImagePayload", "CreateKeyPairPayload", - "CreateNetworkAddressFamily", + "CreateManagementNetworkPayload", + "CreateManagementNetworkRoutePayload", "CreateNetworkAreaPayload", "CreateNetworkAreaRangePayload", "CreateNetworkAreaRoutePayload", - "CreateNetworkIPv4Body", - "CreateNetworkIPv6Body", + "CreateNetworkIPv4", + "CreateNetworkIPv4WithPrefix", + "CreateNetworkIPv4WithPrefixLength", + "CreateNetworkIPv6", + "CreateNetworkIPv6WithPrefix", + "CreateNetworkIPv6WithPrefixLength", "CreateNetworkPayload", "CreateNicPayload", "CreateProtocol", @@ -66,9 +68,10 @@ "CreateServerNetworking", "CreateServerNetworkingWithNics", "CreateServerPayload", - "CreateServerPayloadNetworking", - "CreateSnapshotPayload", + "CreateServerPayloadAllOfNetworking", "CreateVolumePayload", + "DestinationCIDRv4", + "DestinationCIDRv6", "Error", "GetServerLog200Response", "ICMPParameters", @@ -84,15 +87,24 @@ "Keypair", "MachineType", "MachineTypeListResponse", + "ManagementRoute", + "ManagementRouteDestination", + "ManagementRouteListResponse", + "ManagementRouteNexthop", "NIC", "NICListResponse", "Network", "NetworkArea", - "NetworkAreaIPv4", "NetworkAreaListResponse", + "NetworkIPv4", + "NetworkIPv6", "NetworkListResponse", "NetworkRange", "NetworkRangeListResponse", + "NexthopBlackhole", + "NexthopIPv4", + "NexthopIPv6", + "NexthopInternet", "PartialUpdateNetworkAreaPayload", "PartialUpdateNetworkPayload", "PortRange", @@ -106,45 +118,58 @@ "Quota", "QuotaList", "QuotaListResponse", + "RegionalArea", + "RegionalAreaIPv4", + "RegionalAreaListResponse", "Request", "RequestResource", "RescueServerPayload", "ResizeServerPayload", "ResizeVolumePayload", "Route", + "RouteDestination", "RouteListResponse", + "RouteNexthop", + "RoutingTable", + "RoutingTableListResponse", "SecurityGroup", "SecurityGroupListResponse", "SecurityGroupRule", "SecurityGroupRuleListResponse", "SecurityGroupRuleProtocol", "Server", + "ServerAgent", "ServerConsoleUrl", "ServerListResponse", "ServerMaintenance", "ServerNetwork", + "ServerNetworking", "ServiceAccountMailListResponse", "SetImageSharePayload", "Snapshot", "SnapshotListResponse", "StaticAreaID", - "UpdateAreaAddressFamily", - "UpdateAreaIPv4", "UpdateAttachedVolumePayload", - "UpdateBackupPayload", "UpdateImagePayload", "UpdateImageSharePayload", "UpdateKeyPairPayload", - "UpdateNetworkAddressFamily", - "UpdateNetworkAreaRoutePayload", + "UpdateManagementNetworkRoutePayload", "UpdateNetworkIPv4Body", "UpdateNetworkIPv6Body", "UpdateNicPayload", "UpdatePublicIPPayload", - "UpdateSecurityGroupPayload", + "UpdateRegionalAreaIPv4", + "UpdateRouteOfRoutingTablePayload", + "UpdateRoutingTableOfAreaPayload", "UpdateServerPayload", - "UpdateSnapshotPayload", "UpdateVolumePayload", + "V2beta1ConfigureNetworkAreaRegionPayload", + "V2beta1CreateSnapshotPayload", + "V2beta1UpdateBackupPayload", + "V2beta1UpdateNetworkAreaRegionPayload", + "V2beta1UpdateRouteOfAreaPayload", + "V2beta1UpdateSecurityGroupPayload", + "V2beta1UpdateSnapshotPayload", "Volume", "VolumeAttachment", "VolumeAttachmentListResponse", @@ -170,6 +195,12 @@ from stackit.iaas.exceptions import OpenApiException as OpenApiException # import models into sdk package +from stackit.iaas.models.add_routes_to_routing_table_payload import ( + AddRoutesToRoutingTablePayload as AddRoutesToRoutingTablePayload, +) +from stackit.iaas.models.add_routing_table_to_area_payload import ( + AddRoutingTableToAreaPayload as AddRoutingTableToAreaPayload, +) from stackit.iaas.models.add_volume_to_server_payload import ( AddVolumeToServerPayload as AddVolumeToServerPayload, ) @@ -180,12 +211,7 @@ from stackit.iaas.models.allowed_addresses_inner import ( AllowedAddressesInner as AllowedAddressesInner, ) -from stackit.iaas.models.area import Area as Area -from stackit.iaas.models.area_config import AreaConfig as AreaConfig from stackit.iaas.models.area_id import AreaId as AreaId -from stackit.iaas.models.area_prefix_config_ipv4 import ( - AreaPrefixConfigIPv4 as AreaPrefixConfigIPv4, -) from stackit.iaas.models.availability_zone_list_response import ( AvailabilityZoneListResponse as AvailabilityZoneListResponse, ) @@ -202,10 +228,6 @@ from stackit.iaas.models.create_affinity_group_payload import ( CreateAffinityGroupPayload as CreateAffinityGroupPayload, ) -from stackit.iaas.models.create_area_address_family import ( - CreateAreaAddressFamily as CreateAreaAddressFamily, -) -from stackit.iaas.models.create_area_ipv4 import CreateAreaIPv4 as CreateAreaIPv4 from stackit.iaas.models.create_backup_payload import ( CreateBackupPayload as CreateBackupPayload, ) @@ -215,8 +237,11 @@ from stackit.iaas.models.create_key_pair_payload import ( CreateKeyPairPayload as CreateKeyPairPayload, ) -from stackit.iaas.models.create_network_address_family import ( - CreateNetworkAddressFamily as CreateNetworkAddressFamily, +from stackit.iaas.models.create_management_network_payload import ( + CreateManagementNetworkPayload as CreateManagementNetworkPayload, +) +from stackit.iaas.models.create_management_network_route_payload import ( + CreateManagementNetworkRoutePayload as CreateManagementNetworkRoutePayload, ) from stackit.iaas.models.create_network_area_payload import ( CreateNetworkAreaPayload as CreateNetworkAreaPayload, @@ -227,11 +252,23 @@ from stackit.iaas.models.create_network_area_route_payload import ( CreateNetworkAreaRoutePayload as CreateNetworkAreaRoutePayload, ) -from stackit.iaas.models.create_network_ipv4_body import ( - CreateNetworkIPv4Body as CreateNetworkIPv4Body, +from stackit.iaas.models.create_network_ipv4 import ( + CreateNetworkIPv4 as CreateNetworkIPv4, +) +from stackit.iaas.models.create_network_ipv4_with_prefix import ( + CreateNetworkIPv4WithPrefix as CreateNetworkIPv4WithPrefix, +) +from stackit.iaas.models.create_network_ipv4_with_prefix_length import ( + CreateNetworkIPv4WithPrefixLength as CreateNetworkIPv4WithPrefixLength, +) +from stackit.iaas.models.create_network_ipv6 import ( + CreateNetworkIPv6 as CreateNetworkIPv6, ) -from stackit.iaas.models.create_network_ipv6_body import ( - CreateNetworkIPv6Body as CreateNetworkIPv6Body, +from stackit.iaas.models.create_network_ipv6_with_prefix import ( + CreateNetworkIPv6WithPrefix as CreateNetworkIPv6WithPrefix, +) +from stackit.iaas.models.create_network_ipv6_with_prefix_length import ( + CreateNetworkIPv6WithPrefixLength as CreateNetworkIPv6WithPrefixLength, ) from stackit.iaas.models.create_network_payload import ( CreateNetworkPayload as CreateNetworkPayload, @@ -259,15 +296,18 @@ from stackit.iaas.models.create_server_payload import ( CreateServerPayload as CreateServerPayload, ) -from stackit.iaas.models.create_server_payload_networking import ( - CreateServerPayloadNetworking as CreateServerPayloadNetworking, -) -from stackit.iaas.models.create_snapshot_payload import ( - CreateSnapshotPayload as CreateSnapshotPayload, +from stackit.iaas.models.create_server_payload_all_of_networking import ( + CreateServerPayloadAllOfNetworking as CreateServerPayloadAllOfNetworking, ) from stackit.iaas.models.create_volume_payload import ( CreateVolumePayload as CreateVolumePayload, ) +from stackit.iaas.models.destination_cidrv4 import ( + DestinationCIDRv4 as DestinationCIDRv4, +) +from stackit.iaas.models.destination_cidrv6 import ( + DestinationCIDRv6 as DestinationCIDRv6, +) from stackit.iaas.models.error import Error as Error from stackit.iaas.models.get_server_log200_response import ( GetServerLog200Response as GetServerLog200Response, @@ -295,12 +335,23 @@ from stackit.iaas.models.machine_type_list_response import ( MachineTypeListResponse as MachineTypeListResponse, ) +from stackit.iaas.models.management_route import ManagementRoute as ManagementRoute +from stackit.iaas.models.management_route_destination import ( + ManagementRouteDestination as ManagementRouteDestination, +) +from stackit.iaas.models.management_route_list_response import ( + ManagementRouteListResponse as ManagementRouteListResponse, +) +from stackit.iaas.models.management_route_nexthop import ( + ManagementRouteNexthop as ManagementRouteNexthop, +) from stackit.iaas.models.network import Network as Network from stackit.iaas.models.network_area import NetworkArea as NetworkArea -from stackit.iaas.models.network_area_ipv4 import NetworkAreaIPv4 as NetworkAreaIPv4 from stackit.iaas.models.network_area_list_response import ( NetworkAreaListResponse as NetworkAreaListResponse, ) +from stackit.iaas.models.network_ipv4 import NetworkIPv4 as NetworkIPv4 +from stackit.iaas.models.network_ipv6 import NetworkIPv6 as NetworkIPv6 from stackit.iaas.models.network_list_response import ( NetworkListResponse as NetworkListResponse, ) @@ -308,6 +359,10 @@ from stackit.iaas.models.network_range_list_response import ( NetworkRangeListResponse as NetworkRangeListResponse, ) +from stackit.iaas.models.nexthop_blackhole import NexthopBlackhole as NexthopBlackhole +from stackit.iaas.models.nexthop_internet import NexthopInternet as NexthopInternet +from stackit.iaas.models.nexthop_ipv4 import NexthopIPv4 as NexthopIPv4 +from stackit.iaas.models.nexthop_ipv6 import NexthopIPv6 as NexthopIPv6 from stackit.iaas.models.nic import NIC as NIC from stackit.iaas.models.nic_list_response import NICListResponse as NICListResponse from stackit.iaas.models.partial_update_network_area_payload import ( @@ -335,6 +390,11 @@ from stackit.iaas.models.quota_list_response import ( QuotaListResponse as QuotaListResponse, ) +from stackit.iaas.models.regional_area import RegionalArea as RegionalArea +from stackit.iaas.models.regional_area_ipv4 import RegionalAreaIPv4 as RegionalAreaIPv4 +from stackit.iaas.models.regional_area_list_response import ( + RegionalAreaListResponse as RegionalAreaListResponse, +) from stackit.iaas.models.request import Request as Request from stackit.iaas.models.request_resource import RequestResource as RequestResource from stackit.iaas.models.rescue_server_payload import ( @@ -347,9 +407,15 @@ ResizeVolumePayload as ResizeVolumePayload, ) from stackit.iaas.models.route import Route as Route +from stackit.iaas.models.route_destination import RouteDestination as RouteDestination from stackit.iaas.models.route_list_response import ( RouteListResponse as RouteListResponse, ) +from stackit.iaas.models.route_nexthop import RouteNexthop as RouteNexthop +from stackit.iaas.models.routing_table import RoutingTable as RoutingTable +from stackit.iaas.models.routing_table_list_response import ( + RoutingTableListResponse as RoutingTableListResponse, +) from stackit.iaas.models.security_group import SecurityGroup as SecurityGroup from stackit.iaas.models.security_group_list_response import ( SecurityGroupListResponse as SecurityGroupListResponse, @@ -364,6 +430,7 @@ SecurityGroupRuleProtocol as SecurityGroupRuleProtocol, ) from stackit.iaas.models.server import Server as Server +from stackit.iaas.models.server_agent import ServerAgent as ServerAgent from stackit.iaas.models.server_console_url import ServerConsoleUrl as ServerConsoleUrl from stackit.iaas.models.server_list_response import ( ServerListResponse as ServerListResponse, @@ -372,6 +439,7 @@ ServerMaintenance as ServerMaintenance, ) from stackit.iaas.models.server_network import ServerNetwork as ServerNetwork +from stackit.iaas.models.server_networking import ServerNetworking as ServerNetworking from stackit.iaas.models.service_account_mail_list_response import ( ServiceAccountMailListResponse as ServiceAccountMailListResponse, ) @@ -383,16 +451,9 @@ SnapshotListResponse as SnapshotListResponse, ) from stackit.iaas.models.static_area_id import StaticAreaID as StaticAreaID -from stackit.iaas.models.update_area_address_family import ( - UpdateAreaAddressFamily as UpdateAreaAddressFamily, -) -from stackit.iaas.models.update_area_ipv4 import UpdateAreaIPv4 as UpdateAreaIPv4 from stackit.iaas.models.update_attached_volume_payload import ( UpdateAttachedVolumePayload as UpdateAttachedVolumePayload, ) -from stackit.iaas.models.update_backup_payload import ( - UpdateBackupPayload as UpdateBackupPayload, -) from stackit.iaas.models.update_image_payload import ( UpdateImagePayload as UpdateImagePayload, ) @@ -402,11 +463,8 @@ from stackit.iaas.models.update_key_pair_payload import ( UpdateKeyPairPayload as UpdateKeyPairPayload, ) -from stackit.iaas.models.update_network_address_family import ( - UpdateNetworkAddressFamily as UpdateNetworkAddressFamily, -) -from stackit.iaas.models.update_network_area_route_payload import ( - UpdateNetworkAreaRoutePayload as UpdateNetworkAreaRoutePayload, +from stackit.iaas.models.update_management_network_route_payload import ( + UpdateManagementNetworkRoutePayload as UpdateManagementNetworkRoutePayload, ) from stackit.iaas.models.update_network_ipv4_body import ( UpdateNetworkIPv4Body as UpdateNetworkIPv4Body, @@ -418,18 +476,42 @@ from stackit.iaas.models.update_public_ip_payload import ( UpdatePublicIPPayload as UpdatePublicIPPayload, ) -from stackit.iaas.models.update_security_group_payload import ( - UpdateSecurityGroupPayload as UpdateSecurityGroupPayload, +from stackit.iaas.models.update_regional_area_ipv4 import ( + UpdateRegionalAreaIPv4 as UpdateRegionalAreaIPv4, +) +from stackit.iaas.models.update_route_of_routing_table_payload import ( + UpdateRouteOfRoutingTablePayload as UpdateRouteOfRoutingTablePayload, +) +from stackit.iaas.models.update_routing_table_of_area_payload import ( + UpdateRoutingTableOfAreaPayload as UpdateRoutingTableOfAreaPayload, ) from stackit.iaas.models.update_server_payload import ( UpdateServerPayload as UpdateServerPayload, ) -from stackit.iaas.models.update_snapshot_payload import ( - UpdateSnapshotPayload as UpdateSnapshotPayload, -) from stackit.iaas.models.update_volume_payload import ( UpdateVolumePayload as UpdateVolumePayload, ) +from stackit.iaas.models.v2beta1_configure_network_area_region_payload import ( + V2beta1ConfigureNetworkAreaRegionPayload as V2beta1ConfigureNetworkAreaRegionPayload, +) +from stackit.iaas.models.v2beta1_create_snapshot_payload import ( + V2beta1CreateSnapshotPayload as V2beta1CreateSnapshotPayload, +) +from stackit.iaas.models.v2beta1_update_backup_payload import ( + V2beta1UpdateBackupPayload as V2beta1UpdateBackupPayload, +) +from stackit.iaas.models.v2beta1_update_network_area_region_payload import ( + V2beta1UpdateNetworkAreaRegionPayload as V2beta1UpdateNetworkAreaRegionPayload, +) +from stackit.iaas.models.v2beta1_update_route_of_area_payload import ( + V2beta1UpdateRouteOfAreaPayload as V2beta1UpdateRouteOfAreaPayload, +) +from stackit.iaas.models.v2beta1_update_security_group_payload import ( + V2beta1UpdateSecurityGroupPayload as V2beta1UpdateSecurityGroupPayload, +) +from stackit.iaas.models.v2beta1_update_snapshot_payload import ( + V2beta1UpdateSnapshotPayload as V2beta1UpdateSnapshotPayload, +) from stackit.iaas.models.volume import Volume as Volume from stackit.iaas.models.volume_attachment import VolumeAttachment as VolumeAttachment from stackit.iaas.models.volume_attachment_list_response import ( diff --git a/services/iaas/src/stackit/iaas/api/default_api.py b/services/iaas/src/stackit/iaas/api/default_api.py index be3bf0f5..1edacb73 100644 --- a/services/iaas/src/stackit/iaas/api/default_api.py +++ b/services/iaas/src/stackit/iaas/api/default_api.py @@ -5,7 +5,7 @@ This API allows you to create and modify IaaS resources. - The version of the OpenAPI document: 1 + The version of the OpenAPI document: 2beta1 Contact: stackit-iaas@mail.schwarz Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -27,6 +27,12 @@ from stackit.iaas.api_client import ApiClient, RequestSerialized from stackit.iaas.api_response import ApiResponse +from stackit.iaas.models.add_routes_to_routing_table_payload import ( + AddRoutesToRoutingTablePayload, +) +from stackit.iaas.models.add_routing_table_to_area_payload import ( + AddRoutingTableToAreaPayload, +) from stackit.iaas.models.add_volume_to_server_payload import AddVolumeToServerPayload from stackit.iaas.models.affinity_group import AffinityGroup from stackit.iaas.models.affinity_group_list_response import AffinityGroupListResponse @@ -39,6 +45,12 @@ from stackit.iaas.models.create_backup_payload import CreateBackupPayload from stackit.iaas.models.create_image_payload import CreateImagePayload from stackit.iaas.models.create_key_pair_payload import CreateKeyPairPayload +from stackit.iaas.models.create_management_network_payload import ( + CreateManagementNetworkPayload, +) +from stackit.iaas.models.create_management_network_route_payload import ( + CreateManagementNetworkRoutePayload, +) from stackit.iaas.models.create_network_area_payload import CreateNetworkAreaPayload from stackit.iaas.models.create_network_area_range_payload import ( CreateNetworkAreaRangePayload, @@ -54,7 +66,6 @@ CreateSecurityGroupRulePayload, ) from stackit.iaas.models.create_server_payload import CreateServerPayload -from stackit.iaas.models.create_snapshot_payload import CreateSnapshotPayload from stackit.iaas.models.create_volume_payload import CreateVolumePayload from stackit.iaas.models.get_server_log200_response import GetServerLog200Response from stackit.iaas.models.image import Image @@ -66,6 +77,10 @@ from stackit.iaas.models.keypair import Keypair from stackit.iaas.models.machine_type import MachineType from stackit.iaas.models.machine_type_list_response import MachineTypeListResponse +from stackit.iaas.models.management_route import ManagementRoute +from stackit.iaas.models.management_route_list_response import ( + ManagementRouteListResponse, +) from stackit.iaas.models.network import Network from stackit.iaas.models.network_area import NetworkArea from stackit.iaas.models.network_area_list_response import NetworkAreaListResponse @@ -86,12 +101,16 @@ from stackit.iaas.models.public_ip_list_response import PublicIpListResponse from stackit.iaas.models.public_network_list_response import PublicNetworkListResponse from stackit.iaas.models.quota_list_response import QuotaListResponse +from stackit.iaas.models.regional_area import RegionalArea +from stackit.iaas.models.regional_area_list_response import RegionalAreaListResponse from stackit.iaas.models.request import Request from stackit.iaas.models.rescue_server_payload import RescueServerPayload from stackit.iaas.models.resize_server_payload import ResizeServerPayload from stackit.iaas.models.resize_volume_payload import ResizeVolumePayload from stackit.iaas.models.route import Route from stackit.iaas.models.route_list_response import RouteListResponse +from stackit.iaas.models.routing_table import RoutingTable +from stackit.iaas.models.routing_table_list_response import RoutingTableListResponse from stackit.iaas.models.security_group import SecurityGroup from stackit.iaas.models.security_group_list_response import SecurityGroupListResponse from stackit.iaas.models.security_group_rule import SecurityGroupRule @@ -110,19 +129,41 @@ from stackit.iaas.models.update_attached_volume_payload import ( UpdateAttachedVolumePayload, ) -from stackit.iaas.models.update_backup_payload import UpdateBackupPayload from stackit.iaas.models.update_image_payload import UpdateImagePayload from stackit.iaas.models.update_image_share_payload import UpdateImageSharePayload from stackit.iaas.models.update_key_pair_payload import UpdateKeyPairPayload -from stackit.iaas.models.update_network_area_route_payload import ( - UpdateNetworkAreaRoutePayload, +from stackit.iaas.models.update_management_network_route_payload import ( + UpdateManagementNetworkRoutePayload, ) from stackit.iaas.models.update_nic_payload import UpdateNicPayload from stackit.iaas.models.update_public_ip_payload import UpdatePublicIPPayload -from stackit.iaas.models.update_security_group_payload import UpdateSecurityGroupPayload +from stackit.iaas.models.update_route_of_routing_table_payload import ( + UpdateRouteOfRoutingTablePayload, +) +from stackit.iaas.models.update_routing_table_of_area_payload import ( + UpdateRoutingTableOfAreaPayload, +) from stackit.iaas.models.update_server_payload import UpdateServerPayload -from stackit.iaas.models.update_snapshot_payload import UpdateSnapshotPayload from stackit.iaas.models.update_volume_payload import UpdateVolumePayload +from stackit.iaas.models.v2beta1_configure_network_area_region_payload import ( + V2beta1ConfigureNetworkAreaRegionPayload, +) +from stackit.iaas.models.v2beta1_create_snapshot_payload import ( + V2beta1CreateSnapshotPayload, +) +from stackit.iaas.models.v2beta1_update_backup_payload import V2beta1UpdateBackupPayload +from stackit.iaas.models.v2beta1_update_network_area_region_payload import ( + V2beta1UpdateNetworkAreaRegionPayload, +) +from stackit.iaas.models.v2beta1_update_route_of_area_payload import ( + V2beta1UpdateRouteOfAreaPayload, +) +from stackit.iaas.models.v2beta1_update_security_group_payload import ( + V2beta1UpdateSecurityGroupPayload, +) +from stackit.iaas.models.v2beta1_update_snapshot_payload import ( + V2beta1UpdateSnapshotPayload, +) from stackit.iaas.models.volume import Volume from stackit.iaas.models.volume_attachment import VolumeAttachment from stackit.iaas.models.volume_attachment_list_response import ( @@ -156,6 +197,7 @@ def add_network_to_server( str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], server_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Server."), @@ -180,6 +222,8 @@ def add_network_to_server( :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str :param server_id: The identifier (ID) of a STACKIT Server. (required) :type server_id: str :param network_id: The identifier (ID) of a STACKIT Network. (required) @@ -208,6 +252,7 @@ def add_network_to_server( _param = self._add_network_to_server_serialize( project_id=project_id, + region=region, server_id=server_id, network_id=network_id, _request_auth=_request_auth, @@ -238,6 +283,7 @@ def add_network_to_server_with_http_info( str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], server_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Server."), @@ -262,6 +308,8 @@ def add_network_to_server_with_http_info( :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str :param server_id: The identifier (ID) of a STACKIT Server. (required) :type server_id: str :param network_id: The identifier (ID) of a STACKIT Network. (required) @@ -290,6 +338,7 @@ def add_network_to_server_with_http_info( _param = self._add_network_to_server_serialize( project_id=project_id, + region=region, server_id=server_id, network_id=network_id, _request_auth=_request_auth, @@ -320,6 +369,7 @@ def add_network_to_server_without_preload_content( str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], server_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Server."), @@ -344,6 +394,8 @@ def add_network_to_server_without_preload_content( :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str :param server_id: The identifier (ID) of a STACKIT Server. (required) :type server_id: str :param network_id: The identifier (ID) of a STACKIT Network. (required) @@ -372,6 +424,7 @@ def add_network_to_server_without_preload_content( _param = self._add_network_to_server_serialize( project_id=project_id, + region=region, server_id=server_id, network_id=network_id, _request_auth=_request_auth, @@ -394,6 +447,7 @@ def add_network_to_server_without_preload_content( def _add_network_to_server_serialize( self, project_id, + region, server_id, network_id, _request_auth, @@ -416,6 +470,8 @@ def _add_network_to_server_serialize( # process the path parameters if project_id is not None: _path_params["projectId"] = project_id + if region is not None: + _path_params["region"] = region if server_id is not None: _path_params["serverId"] = server_id if network_id is not None: @@ -434,7 +490,7 @@ def _add_network_to_server_serialize( return self.api_client.param_serialize( method="POST", - resource_path="/v1/projects/{projectId}/servers/{serverId}/networks/{networkId}", + resource_path="/v2beta1/projects/{projectId}/regions/{region}/servers/{serverId}/networks/{networkId}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -454,6 +510,7 @@ def add_nic_to_server( str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], server_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Server."), @@ -478,6 +535,8 @@ def add_nic_to_server( :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str :param server_id: The identifier (ID) of a STACKIT Server. (required) :type server_id: str :param nic_id: The identifier (ID) of a network interface. (required) @@ -506,6 +565,7 @@ def add_nic_to_server( _param = self._add_nic_to_server_serialize( project_id=project_id, + region=region, server_id=server_id, nic_id=nic_id, _request_auth=_request_auth, @@ -537,6 +597,7 @@ def add_nic_to_server_with_http_info( str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], server_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Server."), @@ -561,6 +622,8 @@ def add_nic_to_server_with_http_info( :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str :param server_id: The identifier (ID) of a STACKIT Server. (required) :type server_id: str :param nic_id: The identifier (ID) of a network interface. (required) @@ -589,6 +652,7 @@ def add_nic_to_server_with_http_info( _param = self._add_nic_to_server_serialize( project_id=project_id, + region=region, server_id=server_id, nic_id=nic_id, _request_auth=_request_auth, @@ -620,6 +684,7 @@ def add_nic_to_server_without_preload_content( str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], server_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Server."), @@ -644,6 +709,8 @@ def add_nic_to_server_without_preload_content( :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str :param server_id: The identifier (ID) of a STACKIT Server. (required) :type server_id: str :param nic_id: The identifier (ID) of a network interface. (required) @@ -672,6 +739,7 @@ def add_nic_to_server_without_preload_content( _param = self._add_nic_to_server_serialize( project_id=project_id, + region=region, server_id=server_id, nic_id=nic_id, _request_auth=_request_auth, @@ -695,6 +763,7 @@ def add_nic_to_server_without_preload_content( def _add_nic_to_server_serialize( self, project_id, + region, server_id, nic_id, _request_auth, @@ -717,6 +786,8 @@ def _add_nic_to_server_serialize( # process the path parameters if project_id is not None: _path_params["projectId"] = project_id + if region is not None: + _path_params["region"] = region if server_id is not None: _path_params["serverId"] = server_id if nic_id is not None: @@ -735,7 +806,7 @@ def _add_nic_to_server_serialize( return self.api_client.param_serialize( method="PUT", - resource_path="/v1/projects/{projectId}/servers/{serverId}/nics/{nicId}", + resource_path="/v2beta1/projects/{projectId}/regions/{region}/servers/{serverId}/nics/{nicId}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -755,6 +826,7 @@ def add_public_ip_to_server( str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], server_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Server."), @@ -778,6 +850,8 @@ def add_public_ip_to_server( :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str :param server_id: The identifier (ID) of a STACKIT Server. (required) :type server_id: str :param public_ip_id: The identifier (ID) of a Public IP. (required) @@ -806,6 +880,7 @@ def add_public_ip_to_server( _param = self._add_public_ip_to_server_serialize( project_id=project_id, + region=region, server_id=server_id, public_ip_id=public_ip_id, _request_auth=_request_auth, @@ -837,6 +912,7 @@ def add_public_ip_to_server_with_http_info( str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], server_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Server."), @@ -860,6 +936,8 @@ def add_public_ip_to_server_with_http_info( :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str :param server_id: The identifier (ID) of a STACKIT Server. (required) :type server_id: str :param public_ip_id: The identifier (ID) of a Public IP. (required) @@ -888,6 +966,7 @@ def add_public_ip_to_server_with_http_info( _param = self._add_public_ip_to_server_serialize( project_id=project_id, + region=region, server_id=server_id, public_ip_id=public_ip_id, _request_auth=_request_auth, @@ -919,6 +998,7 @@ def add_public_ip_to_server_without_preload_content( str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], server_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Server."), @@ -942,6 +1022,8 @@ def add_public_ip_to_server_without_preload_content( :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str :param server_id: The identifier (ID) of a STACKIT Server. (required) :type server_id: str :param public_ip_id: The identifier (ID) of a Public IP. (required) @@ -970,6 +1052,7 @@ def add_public_ip_to_server_without_preload_content( _param = self._add_public_ip_to_server_serialize( project_id=project_id, + region=region, server_id=server_id, public_ip_id=public_ip_id, _request_auth=_request_auth, @@ -993,6 +1076,7 @@ def add_public_ip_to_server_without_preload_content( def _add_public_ip_to_server_serialize( self, project_id, + region, server_id, public_ip_id, _request_auth, @@ -1015,6 +1099,8 @@ def _add_public_ip_to_server_serialize( # process the path parameters if project_id is not None: _path_params["projectId"] = project_id + if region is not None: + _path_params["region"] = region if server_id is not None: _path_params["serverId"] = server_id if public_ip_id is not None: @@ -1033,7 +1119,7 @@ def _add_public_ip_to_server_serialize( return self.api_client.param_serialize( method="PUT", - resource_path="/v1/projects/{projectId}/servers/{serverId}/public-ips/{publicIpId}", + resource_path="/v2beta1/projects/{projectId}/regions/{region}/servers/{serverId}/public-ips/{publicIpId}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1047,25 +1133,30 @@ def _add_public_ip_to_server_serialize( ) @validate_call - def add_security_group_to_server( + def add_routes_to_routing_table( self, - project_id: Annotated[ + organization_id: Annotated[ str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), + Field( + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Organization." + ), ], - server_id: Annotated[ + area_id: Annotated[ str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Server."), + Field( + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Network Area." + ), ], - security_group_id: Annotated[ + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + routing_table_id: Annotated[ str, Field( - min_length=36, - strict=True, - max_length=36, - description="The identifier (ID) of a STACKIT Security Group.", + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Routing Table." ), ], + add_routes_to_routing_table_payload: Annotated[ + AddRoutesToRoutingTablePayload, Field(description="Request an addition of routes to a routing table.") + ], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1075,17 +1166,21 @@ def add_security_group_to_server( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> None: - """Add a server to a security group. + ) -> RouteListResponse: + """Create new routes in a routing table. - Add an existing server to an existing security group. + Create new routes in an existing routing table. - :param project_id: The identifier (ID) of a STACKIT Project. (required) - :type project_id: str - :param server_id: The identifier (ID) of a STACKIT Server. (required) - :type server_id: str - :param security_group_id: The identifier (ID) of a STACKIT Security Group. (required) - :type security_group_id: str + :param organization_id: The identifier (ID) of a STACKIT Organization. (required) + :type organization_id: str + :param area_id: The identifier (ID) of a STACKIT Network Area. (required) + :type area_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param routing_table_id: The identifier (ID) of a STACKIT Routing Table. (required) + :type routing_table_id: str + :param add_routes_to_routing_table_payload: Request an addition of routes to a routing table. (required) + :type add_routes_to_routing_table_payload: AddRoutesToRoutingTablePayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1108,10 +1203,12 @@ def add_security_group_to_server( :return: Returns the result object. """ # noqa: E501 - _param = self._add_security_group_to_server_serialize( - project_id=project_id, - server_id=server_id, - security_group_id=security_group_id, + _param = self._add_routes_to_routing_table_serialize( + organization_id=organization_id, + area_id=area_id, + region=region, + routing_table_id=routing_table_id, + add_routes_to_routing_table_payload=add_routes_to_routing_table_payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1119,7 +1216,7 @@ def add_security_group_to_server( ) _response_types_map: Dict[str, Optional[str]] = { - "202": None, + "201": "RouteListResponse", "400": "Error", "401": "Error", "403": "Error", @@ -1135,25 +1232,30 @@ def add_security_group_to_server( ).data @validate_call - def add_security_group_to_server_with_http_info( + def add_routes_to_routing_table_with_http_info( self, - project_id: Annotated[ + organization_id: Annotated[ str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), + Field( + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Organization." + ), ], - server_id: Annotated[ + area_id: Annotated[ str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Server."), + Field( + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Network Area." + ), ], - security_group_id: Annotated[ + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + routing_table_id: Annotated[ str, Field( - min_length=36, - strict=True, - max_length=36, - description="The identifier (ID) of a STACKIT Security Group.", + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Routing Table." ), ], + add_routes_to_routing_table_payload: Annotated[ + AddRoutesToRoutingTablePayload, Field(description="Request an addition of routes to a routing table.") + ], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1163,17 +1265,21 @@ def add_security_group_to_server_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[None]: - """Add a server to a security group. + ) -> ApiResponse[RouteListResponse]: + """Create new routes in a routing table. - Add an existing server to an existing security group. + Create new routes in an existing routing table. - :param project_id: The identifier (ID) of a STACKIT Project. (required) - :type project_id: str - :param server_id: The identifier (ID) of a STACKIT Server. (required) - :type server_id: str - :param security_group_id: The identifier (ID) of a STACKIT Security Group. (required) - :type security_group_id: str + :param organization_id: The identifier (ID) of a STACKIT Organization. (required) + :type organization_id: str + :param area_id: The identifier (ID) of a STACKIT Network Area. (required) + :type area_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param routing_table_id: The identifier (ID) of a STACKIT Routing Table. (required) + :type routing_table_id: str + :param add_routes_to_routing_table_payload: Request an addition of routes to a routing table. (required) + :type add_routes_to_routing_table_payload: AddRoutesToRoutingTablePayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1196,10 +1302,12 @@ def add_security_group_to_server_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._add_security_group_to_server_serialize( - project_id=project_id, - server_id=server_id, - security_group_id=security_group_id, + _param = self._add_routes_to_routing_table_serialize( + organization_id=organization_id, + area_id=area_id, + region=region, + routing_table_id=routing_table_id, + add_routes_to_routing_table_payload=add_routes_to_routing_table_payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1207,7 +1315,7 @@ def add_security_group_to_server_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "202": None, + "201": "RouteListResponse", "400": "Error", "401": "Error", "403": "Error", @@ -1223,158 +1331,29 @@ def add_security_group_to_server_with_http_info( ) @validate_call - def add_security_group_to_server_without_preload_content( + def add_routes_to_routing_table_without_preload_content( self, - project_id: Annotated[ - str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), - ], - server_id: Annotated[ - str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Server."), - ], - security_group_id: Annotated[ + organization_id: Annotated[ str, Field( - min_length=36, - strict=True, - max_length=36, - description="The identifier (ID) of a STACKIT Security Group.", + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Organization." ), ], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Add a server to a security group. - - Add an existing server to an existing security group. - - :param project_id: The identifier (ID) of a STACKIT Project. (required) - :type project_id: str - :param server_id: The identifier (ID) of a STACKIT Server. (required) - :type server_id: str - :param security_group_id: The identifier (ID) of a STACKIT Security Group. (required) - :type security_group_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._add_security_group_to_server_serialize( - project_id=project_id, - server_id=server_id, - security_group_id=security_group_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index, - ) - - _response_types_map: Dict[str, Optional[str]] = { - "202": None, - "400": "Error", - "401": "Error", - "403": "Error", - "404": "Error", - "409": "Error", - "500": "Error", - } - response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) - return response_data.response - - def _add_security_group_to_server_serialize( - self, - project_id, - server_id, - security_group_id, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = {} - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if project_id is not None: - _path_params["projectId"] = project_id - if server_id is not None: - _path_params["serverId"] = server_id - if security_group_id is not None: - _path_params["securityGroupId"] = security_group_id - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) - - # authentication setting - _auth_settings: List[str] = [] - - return self.api_client.param_serialize( - method="PUT", - resource_path="/v1/projects/{projectId}/servers/{serverId}/security-groups/{securityGroupId}", - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth, - ) - - @validate_call - def add_service_account_to_server( - self, - project_id: Annotated[ + area_id: Annotated[ str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), + Field( + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Network Area." + ), ], - server_id: Annotated[ + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + routing_table_id: Annotated[ str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Server."), + Field( + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Routing Table." + ), ], - service_account_mail: Annotated[ - str, Field(strict=True, max_length=255, description="The e-mail address of a service account.") + add_routes_to_routing_table_payload: Annotated[ + AddRoutesToRoutingTablePayload, Field(description="Request an addition of routes to a routing table.") ], _request_timeout: Union[ None, @@ -1385,17 +1364,21 @@ def add_service_account_to_server( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ServiceAccountMailListResponse: - """Attach service account to a server. + ) -> RESTResponseType: + """Create new routes in a routing table. - Attach an additional service account to the server. + Create new routes in an existing routing table. - :param project_id: The identifier (ID) of a STACKIT Project. (required) - :type project_id: str - :param server_id: The identifier (ID) of a STACKIT Server. (required) - :type server_id: str - :param service_account_mail: The e-mail address of a service account. (required) - :type service_account_mail: str + :param organization_id: The identifier (ID) of a STACKIT Organization. (required) + :type organization_id: str + :param area_id: The identifier (ID) of a STACKIT Network Area. (required) + :type area_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param routing_table_id: The identifier (ID) of a STACKIT Routing Table. (required) + :type routing_table_id: str + :param add_routes_to_routing_table_payload: Request an addition of routes to a routing table. (required) + :type add_routes_to_routing_table_payload: AddRoutesToRoutingTablePayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1418,10 +1401,12 @@ def add_service_account_to_server( :return: Returns the result object. """ # noqa: E501 - _param = self._add_service_account_to_server_serialize( - project_id=project_id, - server_id=server_id, - service_account_mail=service_account_mail, + _param = self._add_routes_to_routing_table_serialize( + organization_id=organization_id, + area_id=area_id, + region=region, + routing_table_id=routing_table_id, + add_routes_to_routing_table_payload=add_routes_to_routing_table_payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1429,7 +1414,163 @@ def add_service_account_to_server( ) _response_types_map: Dict[str, Optional[str]] = { - "201": "ServiceAccountMailListResponse", + "201": "RouteListResponse", + "400": "Error", + "401": "Error", + "403": "Error", + "404": "Error", + "409": "Error", + "500": "Error", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _add_routes_to_routing_table_serialize( + self, + organization_id, + area_id, + region, + routing_table_id, + add_routes_to_routing_table_payload, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = {} + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if organization_id is not None: + _path_params["organizationId"] = organization_id + if area_id is not None: + _path_params["areaId"] = area_id + if region is not None: + _path_params["region"] = region + if routing_table_id is not None: + _path_params["routingTableId"] = routing_table_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if add_routes_to_routing_table_payload is not None: + _body_params = add_routes_to_routing_table_payload + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params["Content-Type"] = _content_type + else: + _default_content_type = self.api_client.select_header_content_type(["application/json"]) + if _default_content_type is not None: + _header_params["Content-Type"] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [] + + return self.api_client.param_serialize( + method="POST", + resource_path="/v2beta1/organizations/{organizationId}/network-areas/{areaId}/regions/{region}/routing-tables/{routingTableId}/routes", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def add_routing_table_to_area( + self, + organization_id: Annotated[ + str, + Field( + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Organization." + ), + ], + area_id: Annotated[ + str, + Field( + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Network Area." + ), + ], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + add_routing_table_to_area_payload: Annotated[ + AddRoutingTableToAreaPayload, Field(description="Request an addition of a routing table to an area.") + ], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RoutingTable: + """Create new routing table in a network area. + + Create a new routing table in an existing network area. + + :param organization_id: The identifier (ID) of a STACKIT Organization. (required) + :type organization_id: str + :param area_id: The identifier (ID) of a STACKIT Network Area. (required) + :type area_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param add_routing_table_to_area_payload: Request an addition of a routing table to an area. (required) + :type add_routing_table_to_area_payload: AddRoutingTableToAreaPayload + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._add_routing_table_to_area_serialize( + organization_id=organization_id, + area_id=area_id, + region=region, + add_routing_table_to_area_payload=add_routing_table_to_area_payload, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "201": "RoutingTable", "400": "Error", "401": "Error", "403": "Error", @@ -1445,18 +1586,23 @@ def add_service_account_to_server( ).data @validate_call - def add_service_account_to_server_with_http_info( + def add_routing_table_to_area_with_http_info( self, - project_id: Annotated[ + organization_id: Annotated[ str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), + Field( + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Organization." + ), ], - server_id: Annotated[ + area_id: Annotated[ str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Server."), + Field( + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Network Area." + ), ], - service_account_mail: Annotated[ - str, Field(strict=True, max_length=255, description="The e-mail address of a service account.") + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + add_routing_table_to_area_payload: Annotated[ + AddRoutingTableToAreaPayload, Field(description="Request an addition of a routing table to an area.") ], _request_timeout: Union[ None, @@ -1467,17 +1613,19 @@ def add_service_account_to_server_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[ServiceAccountMailListResponse]: - """Attach service account to a server. + ) -> ApiResponse[RoutingTable]: + """Create new routing table in a network area. - Attach an additional service account to the server. + Create a new routing table in an existing network area. - :param project_id: The identifier (ID) of a STACKIT Project. (required) - :type project_id: str - :param server_id: The identifier (ID) of a STACKIT Server. (required) - :type server_id: str - :param service_account_mail: The e-mail address of a service account. (required) - :type service_account_mail: str + :param organization_id: The identifier (ID) of a STACKIT Organization. (required) + :type organization_id: str + :param area_id: The identifier (ID) of a STACKIT Network Area. (required) + :type area_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param add_routing_table_to_area_payload: Request an addition of a routing table to an area. (required) + :type add_routing_table_to_area_payload: AddRoutingTableToAreaPayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1500,10 +1648,11 @@ def add_service_account_to_server_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._add_service_account_to_server_serialize( - project_id=project_id, - server_id=server_id, - service_account_mail=service_account_mail, + _param = self._add_routing_table_to_area_serialize( + organization_id=organization_id, + area_id=area_id, + region=region, + add_routing_table_to_area_payload=add_routing_table_to_area_payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1511,7 +1660,7 @@ def add_service_account_to_server_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "201": "ServiceAccountMailListResponse", + "201": "RoutingTable", "400": "Error", "401": "Error", "403": "Error", @@ -1527,18 +1676,23 @@ def add_service_account_to_server_with_http_info( ) @validate_call - def add_service_account_to_server_without_preload_content( + def add_routing_table_to_area_without_preload_content( self, - project_id: Annotated[ + organization_id: Annotated[ str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), + Field( + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Organization." + ), ], - server_id: Annotated[ + area_id: Annotated[ str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Server."), + Field( + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Network Area." + ), ], - service_account_mail: Annotated[ - str, Field(strict=True, max_length=255, description="The e-mail address of a service account.") + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + add_routing_table_to_area_payload: Annotated[ + AddRoutingTableToAreaPayload, Field(description="Request an addition of a routing table to an area.") ], _request_timeout: Union[ None, @@ -1550,16 +1704,18 @@ def add_service_account_to_server_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Attach service account to a server. + """Create new routing table in a network area. - Attach an additional service account to the server. + Create a new routing table in an existing network area. - :param project_id: The identifier (ID) of a STACKIT Project. (required) - :type project_id: str - :param server_id: The identifier (ID) of a STACKIT Server. (required) - :type server_id: str - :param service_account_mail: The e-mail address of a service account. (required) - :type service_account_mail: str + :param organization_id: The identifier (ID) of a STACKIT Organization. (required) + :type organization_id: str + :param area_id: The identifier (ID) of a STACKIT Network Area. (required) + :type area_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param add_routing_table_to_area_payload: Request an addition of a routing table to an area. (required) + :type add_routing_table_to_area_payload: AddRoutingTableToAreaPayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1582,10 +1738,11 @@ def add_service_account_to_server_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._add_service_account_to_server_serialize( - project_id=project_id, - server_id=server_id, - service_account_mail=service_account_mail, + _param = self._add_routing_table_to_area_serialize( + organization_id=organization_id, + area_id=area_id, + region=region, + add_routing_table_to_area_payload=add_routing_table_to_area_payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1593,7 +1750,7 @@ def add_service_account_to_server_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "201": "ServiceAccountMailListResponse", + "201": "RoutingTable", "400": "Error", "401": "Error", "403": "Error", @@ -1604,11 +1761,12 @@ def add_service_account_to_server_without_preload_content( response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _add_service_account_to_server_serialize( + def _add_routing_table_to_area_serialize( self, - project_id, - server_id, - service_account_mail, + organization_id, + area_id, + region, + add_routing_table_to_area_payload, _request_auth, _content_type, _headers, @@ -1627,27 +1785,37 @@ def _add_service_account_to_server_serialize( _body_params: Optional[bytes] = None # process the path parameters - if project_id is not None: - _path_params["projectId"] = project_id - if server_id is not None: - _path_params["serverId"] = server_id - if service_account_mail is not None: - _path_params["serviceAccountMail"] = service_account_mail + if organization_id is not None: + _path_params["organizationId"] = organization_id + if area_id is not None: + _path_params["areaId"] = area_id + if region is not None: + _path_params["region"] = region # process the query parameters # process the header parameters # process the form parameters # process the body parameter + if add_routing_table_to_area_payload is not None: + _body_params = add_routing_table_to_area_payload # set the HTTP header `Accept` if "Accept" not in _header_params: _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + # set the HTTP header `Content-Type` + if _content_type: + _header_params["Content-Type"] = _content_type + else: + _default_content_type = self.api_client.select_header_content_type(["application/json"]) + if _default_content_type is not None: + _header_params["Content-Type"] = _default_content_type + # authentication setting _auth_settings: List[str] = [] return self.api_client.param_serialize( - method="PUT", - resource_path="/v1/projects/{projectId}/servers/{serverId}/service-accounts/{serviceAccountMail}", + method="POST", + resource_path="/v2beta1/organizations/{organizationId}/network-areas/{areaId}/regions/{region}/routing-tables", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1661,23 +1829,26 @@ def _add_service_account_to_server_serialize( ) @validate_call - def add_volume_to_server( + def add_security_group_to_server( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], server_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Server."), ], - volume_id: Annotated[ + security_group_id: Annotated[ str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Volume."), + Field( + min_length=36, + strict=True, + max_length=36, + description="The identifier (ID) of a STACKIT Security Group.", + ), ], - add_volume_to_server_payload: Annotated[ - Optional[AddVolumeToServerPayload], Field(description="Request a volume attachment creation.") - ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1687,19 +1858,19 @@ def add_volume_to_server( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> VolumeAttachment: - """Attach a volume to a server. + ) -> None: + """Add a server to a security group. - Attach an existing volume to an existing server. + Add an existing server to an existing security group. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str :param server_id: The identifier (ID) of a STACKIT Server. (required) :type server_id: str - :param volume_id: The identifier (ID) of a STACKIT Volume. (required) - :type volume_id: str - :param add_volume_to_server_payload: Request a volume attachment creation. - :type add_volume_to_server_payload: AddVolumeToServerPayload + :param security_group_id: The identifier (ID) of a STACKIT Security Group. (required) + :type security_group_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1722,11 +1893,11 @@ def add_volume_to_server( :return: Returns the result object. """ # noqa: E501 - _param = self._add_volume_to_server_serialize( + _param = self._add_security_group_to_server_serialize( project_id=project_id, + region=region, server_id=server_id, - volume_id=volume_id, - add_volume_to_server_payload=add_volume_to_server_payload, + security_group_id=security_group_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1734,7 +1905,7 @@ def add_volume_to_server( ) _response_types_map: Dict[str, Optional[str]] = { - "202": "VolumeAttachment", + "202": None, "400": "Error", "401": "Error", "403": "Error", @@ -1750,23 +1921,26 @@ def add_volume_to_server( ).data @validate_call - def add_volume_to_server_with_http_info( + def add_security_group_to_server_with_http_info( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], server_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Server."), ], - volume_id: Annotated[ + security_group_id: Annotated[ str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Volume."), + Field( + min_length=36, + strict=True, + max_length=36, + description="The identifier (ID) of a STACKIT Security Group.", + ), ], - add_volume_to_server_payload: Annotated[ - Optional[AddVolumeToServerPayload], Field(description="Request a volume attachment creation.") - ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1776,19 +1950,19 @@ def add_volume_to_server_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[VolumeAttachment]: - """Attach a volume to a server. + ) -> ApiResponse[None]: + """Add a server to a security group. - Attach an existing volume to an existing server. + Add an existing server to an existing security group. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str :param server_id: The identifier (ID) of a STACKIT Server. (required) :type server_id: str - :param volume_id: The identifier (ID) of a STACKIT Volume. (required) - :type volume_id: str - :param add_volume_to_server_payload: Request a volume attachment creation. - :type add_volume_to_server_payload: AddVolumeToServerPayload + :param security_group_id: The identifier (ID) of a STACKIT Security Group. (required) + :type security_group_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1811,11 +1985,11 @@ def add_volume_to_server_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._add_volume_to_server_serialize( + _param = self._add_security_group_to_server_serialize( project_id=project_id, + region=region, server_id=server_id, - volume_id=volume_id, - add_volume_to_server_payload=add_volume_to_server_payload, + security_group_id=security_group_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1823,7 +1997,7 @@ def add_volume_to_server_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "202": "VolumeAttachment", + "202": None, "400": "Error", "401": "Error", "403": "Error", @@ -1839,23 +2013,26 @@ def add_volume_to_server_with_http_info( ) @validate_call - def add_volume_to_server_without_preload_content( + def add_security_group_to_server_without_preload_content( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], server_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Server."), ], - volume_id: Annotated[ + security_group_id: Annotated[ str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Volume."), + Field( + min_length=36, + strict=True, + max_length=36, + description="The identifier (ID) of a STACKIT Security Group.", + ), ], - add_volume_to_server_payload: Annotated[ - Optional[AddVolumeToServerPayload], Field(description="Request a volume attachment creation.") - ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1866,18 +2043,18 @@ def add_volume_to_server_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Attach a volume to a server. + """Add a server to a security group. - Attach an existing volume to an existing server. + Add an existing server to an existing security group. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str :param server_id: The identifier (ID) of a STACKIT Server. (required) :type server_id: str - :param volume_id: The identifier (ID) of a STACKIT Volume. (required) - :type volume_id: str - :param add_volume_to_server_payload: Request a volume attachment creation. - :type add_volume_to_server_payload: AddVolumeToServerPayload + :param security_group_id: The identifier (ID) of a STACKIT Security Group. (required) + :type security_group_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1900,11 +2077,11 @@ def add_volume_to_server_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._add_volume_to_server_serialize( + _param = self._add_security_group_to_server_serialize( project_id=project_id, + region=region, server_id=server_id, - volume_id=volume_id, - add_volume_to_server_payload=add_volume_to_server_payload, + security_group_id=security_group_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1912,7 +2089,7 @@ def add_volume_to_server_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "202": "VolumeAttachment", + "202": None, "400": "Error", "401": "Error", "403": "Error", @@ -1923,12 +2100,12 @@ def add_volume_to_server_without_preload_content( response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _add_volume_to_server_serialize( + def _add_security_group_to_server_serialize( self, project_id, + region, server_id, - volume_id, - add_volume_to_server_payload, + security_group_id, _request_auth, _content_type, _headers, @@ -1949,35 +2126,27 @@ def _add_volume_to_server_serialize( # process the path parameters if project_id is not None: _path_params["projectId"] = project_id + if region is not None: + _path_params["region"] = region if server_id is not None: _path_params["serverId"] = server_id - if volume_id is not None: - _path_params["volumeId"] = volume_id + if security_group_id is not None: + _path_params["securityGroupId"] = security_group_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - if add_volume_to_server_payload is not None: - _body_params = add_volume_to_server_payload # set the HTTP header `Accept` if "Accept" not in _header_params: _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) - # set the HTTP header `Content-Type` - if _content_type: - _header_params["Content-Type"] = _content_type - else: - _default_content_type = self.api_client.select_header_content_type(["application/json"]) - if _default_content_type is not None: - _header_params["Content-Type"] = _default_content_type - # authentication setting _auth_settings: List[str] = [] return self.api_client.param_serialize( method="PUT", - resource_path="/v1/projects/{projectId}/servers/{serverId}/volume-attachments/{volumeId}", + resource_path="/v2beta1/projects/{projectId}/regions/{region}/servers/{serverId}/security-groups/{securityGroupId}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1991,14 +2160,19 @@ def _add_volume_to_server_serialize( ) @validate_call - def create_affinity_group( + def add_service_account_to_server( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - create_affinity_group_payload: Annotated[ - CreateAffinityGroupPayload, Field(description="Request a affinity group creation.") + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + server_id: Annotated[ + str, + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Server."), + ], + service_account_mail: Annotated[ + str, Field(strict=True, max_length=255, description="The e-mail address of a service account.") ], _request_timeout: Union[ None, @@ -2009,15 +2183,19 @@ def create_affinity_group( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> AffinityGroup: - """Create a new affinity group in a project. + ) -> ServiceAccountMailListResponse: + """Attach service account to a server. - Create a new server affinity group in the given project ID. + Attach an additional service account to the server. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str - :param create_affinity_group_payload: Request a affinity group creation. (required) - :type create_affinity_group_payload: CreateAffinityGroupPayload + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param server_id: The identifier (ID) of a STACKIT Server. (required) + :type server_id: str + :param service_account_mail: The e-mail address of a service account. (required) + :type service_account_mail: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2040,9 +2218,11 @@ def create_affinity_group( :return: Returns the result object. """ # noqa: E501 - _param = self._create_affinity_group_serialize( + _param = self._add_service_account_to_server_serialize( project_id=project_id, - create_affinity_group_payload=create_affinity_group_payload, + region=region, + server_id=server_id, + service_account_mail=service_account_mail, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2050,11 +2230,12 @@ def create_affinity_group( ) _response_types_map: Dict[str, Optional[str]] = { - "201": "AffinityGroup", + "201": "ServiceAccountMailListResponse", "400": "Error", "401": "Error", "403": "Error", "404": "Error", + "409": "Error", "500": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -2065,14 +2246,19 @@ def create_affinity_group( ).data @validate_call - def create_affinity_group_with_http_info( + def add_service_account_to_server_with_http_info( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - create_affinity_group_payload: Annotated[ - CreateAffinityGroupPayload, Field(description="Request a affinity group creation.") + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + server_id: Annotated[ + str, + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Server."), + ], + service_account_mail: Annotated[ + str, Field(strict=True, max_length=255, description="The e-mail address of a service account.") ], _request_timeout: Union[ None, @@ -2083,15 +2269,19 @@ def create_affinity_group_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[AffinityGroup]: - """Create a new affinity group in a project. + ) -> ApiResponse[ServiceAccountMailListResponse]: + """Attach service account to a server. - Create a new server affinity group in the given project ID. + Attach an additional service account to the server. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str - :param create_affinity_group_payload: Request a affinity group creation. (required) - :type create_affinity_group_payload: CreateAffinityGroupPayload + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param server_id: The identifier (ID) of a STACKIT Server. (required) + :type server_id: str + :param service_account_mail: The e-mail address of a service account. (required) + :type service_account_mail: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2114,9 +2304,11 @@ def create_affinity_group_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._create_affinity_group_serialize( + _param = self._add_service_account_to_server_serialize( project_id=project_id, - create_affinity_group_payload=create_affinity_group_payload, + region=region, + server_id=server_id, + service_account_mail=service_account_mail, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2124,11 +2316,12 @@ def create_affinity_group_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "201": "AffinityGroup", + "201": "ServiceAccountMailListResponse", "400": "Error", "401": "Error", "403": "Error", "404": "Error", + "409": "Error", "500": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -2139,14 +2332,19 @@ def create_affinity_group_with_http_info( ) @validate_call - def create_affinity_group_without_preload_content( + def add_service_account_to_server_without_preload_content( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - create_affinity_group_payload: Annotated[ - CreateAffinityGroupPayload, Field(description="Request a affinity group creation.") + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + server_id: Annotated[ + str, + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Server."), + ], + service_account_mail: Annotated[ + str, Field(strict=True, max_length=255, description="The e-mail address of a service account.") ], _request_timeout: Union[ None, @@ -2158,14 +2356,18 @@ def create_affinity_group_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Create a new affinity group in a project. + """Attach service account to a server. - Create a new server affinity group in the given project ID. + Attach an additional service account to the server. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str - :param create_affinity_group_payload: Request a affinity group creation. (required) - :type create_affinity_group_payload: CreateAffinityGroupPayload + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param server_id: The identifier (ID) of a STACKIT Server. (required) + :type server_id: str + :param service_account_mail: The e-mail address of a service account. (required) + :type service_account_mail: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2188,9 +2390,11 @@ def create_affinity_group_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._create_affinity_group_serialize( + _param = self._add_service_account_to_server_serialize( project_id=project_id, - create_affinity_group_payload=create_affinity_group_payload, + region=region, + server_id=server_id, + service_account_mail=service_account_mail, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2198,20 +2402,23 @@ def create_affinity_group_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "201": "AffinityGroup", + "201": "ServiceAccountMailListResponse", "400": "Error", "401": "Error", "403": "Error", "404": "Error", + "409": "Error", "500": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _create_affinity_group_serialize( + def _add_service_account_to_server_serialize( self, project_id, - create_affinity_group_payload, + region, + server_id, + service_account_mail, _request_auth, _content_type, _headers, @@ -2232,31 +2439,27 @@ def _create_affinity_group_serialize( # process the path parameters if project_id is not None: _path_params["projectId"] = project_id + if region is not None: + _path_params["region"] = region + if server_id is not None: + _path_params["serverId"] = server_id + if service_account_mail is not None: + _path_params["serviceAccountMail"] = service_account_mail # process the query parameters # process the header parameters # process the form parameters # process the body parameter - if create_affinity_group_payload is not None: - _body_params = create_affinity_group_payload # set the HTTP header `Accept` if "Accept" not in _header_params: _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) - # set the HTTP header `Content-Type` - if _content_type: - _header_params["Content-Type"] = _content_type - else: - _default_content_type = self.api_client.select_header_content_type(["application/json"]) - if _default_content_type is not None: - _header_params["Content-Type"] = _default_content_type - # authentication setting _auth_settings: List[str] = [] return self.api_client.param_serialize( - method="POST", - resource_path="/v1/projects/{projectId}/affinity-groups", + method="PUT", + resource_path="/v2beta1/projects/{projectId}/regions/{region}/servers/{serverId}/service-accounts/{serviceAccountMail}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2270,13 +2473,24 @@ def _create_affinity_group_serialize( ) @validate_call - def create_backup( + def add_volume_to_server( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - create_backup_payload: Annotated[CreateBackupPayload, Field(description="Request a backup creation.")], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + server_id: Annotated[ + str, + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Server."), + ], + volume_id: Annotated[ + str, + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Volume."), + ], + add_volume_to_server_payload: Annotated[ + Optional[AddVolumeToServerPayload], Field(description="Request a volume attachment creation.") + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2286,15 +2500,21 @@ def create_backup( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> Backup: - """Create new Backup. + ) -> VolumeAttachment: + """Attach a volume to a server. - Create a new Backup in a project. If a snapshot ID is provided create the backup from the snapshot. + Attach an existing volume to an existing server. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str - :param create_backup_payload: Request a backup creation. (required) - :type create_backup_payload: CreateBackupPayload + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param server_id: The identifier (ID) of a STACKIT Server. (required) + :type server_id: str + :param volume_id: The identifier (ID) of a STACKIT Volume. (required) + :type volume_id: str + :param add_volume_to_server_payload: Request a volume attachment creation. + :type add_volume_to_server_payload: AddVolumeToServerPayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2317,9 +2537,12 @@ def create_backup( :return: Returns the result object. """ # noqa: E501 - _param = self._create_backup_serialize( + _param = self._add_volume_to_server_serialize( project_id=project_id, - create_backup_payload=create_backup_payload, + region=region, + server_id=server_id, + volume_id=volume_id, + add_volume_to_server_payload=add_volume_to_server_payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2327,11 +2550,12 @@ def create_backup( ) _response_types_map: Dict[str, Optional[str]] = { - "201": "Backup", + "202": "VolumeAttachment", "400": "Error", "401": "Error", "403": "Error", "404": "Error", + "409": "Error", "500": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -2342,13 +2566,24 @@ def create_backup( ).data @validate_call - def create_backup_with_http_info( + def add_volume_to_server_with_http_info( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - create_backup_payload: Annotated[CreateBackupPayload, Field(description="Request a backup creation.")], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + server_id: Annotated[ + str, + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Server."), + ], + volume_id: Annotated[ + str, + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Volume."), + ], + add_volume_to_server_payload: Annotated[ + Optional[AddVolumeToServerPayload], Field(description="Request a volume attachment creation.") + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2358,15 +2593,21 @@ def create_backup_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[Backup]: - """Create new Backup. + ) -> ApiResponse[VolumeAttachment]: + """Attach a volume to a server. - Create a new Backup in a project. If a snapshot ID is provided create the backup from the snapshot. + Attach an existing volume to an existing server. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str - :param create_backup_payload: Request a backup creation. (required) - :type create_backup_payload: CreateBackupPayload + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param server_id: The identifier (ID) of a STACKIT Server. (required) + :type server_id: str + :param volume_id: The identifier (ID) of a STACKIT Volume. (required) + :type volume_id: str + :param add_volume_to_server_payload: Request a volume attachment creation. + :type add_volume_to_server_payload: AddVolumeToServerPayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2389,9 +2630,12 @@ def create_backup_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._create_backup_serialize( + _param = self._add_volume_to_server_serialize( project_id=project_id, - create_backup_payload=create_backup_payload, + region=region, + server_id=server_id, + volume_id=volume_id, + add_volume_to_server_payload=add_volume_to_server_payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2399,11 +2643,12 @@ def create_backup_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "201": "Backup", + "202": "VolumeAttachment", "400": "Error", "401": "Error", "403": "Error", "404": "Error", + "409": "Error", "500": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -2414,13 +2659,24 @@ def create_backup_with_http_info( ) @validate_call - def create_backup_without_preload_content( + def add_volume_to_server_without_preload_content( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - create_backup_payload: Annotated[CreateBackupPayload, Field(description="Request a backup creation.")], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + server_id: Annotated[ + str, + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Server."), + ], + volume_id: Annotated[ + str, + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Volume."), + ], + add_volume_to_server_payload: Annotated[ + Optional[AddVolumeToServerPayload], Field(description="Request a volume attachment creation.") + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2431,14 +2687,20 @@ def create_backup_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Create new Backup. + """Attach a volume to a server. - Create a new Backup in a project. If a snapshot ID is provided create the backup from the snapshot. + Attach an existing volume to an existing server. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str - :param create_backup_payload: Request a backup creation. (required) - :type create_backup_payload: CreateBackupPayload + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param server_id: The identifier (ID) of a STACKIT Server. (required) + :type server_id: str + :param volume_id: The identifier (ID) of a STACKIT Volume. (required) + :type volume_id: str + :param add_volume_to_server_payload: Request a volume attachment creation. + :type add_volume_to_server_payload: AddVolumeToServerPayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2461,9 +2723,12 @@ def create_backup_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._create_backup_serialize( + _param = self._add_volume_to_server_serialize( project_id=project_id, - create_backup_payload=create_backup_payload, + region=region, + server_id=server_id, + volume_id=volume_id, + add_volume_to_server_payload=add_volume_to_server_payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2471,20 +2736,24 @@ def create_backup_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "201": "Backup", + "202": "VolumeAttachment", "400": "Error", "401": "Error", "403": "Error", "404": "Error", + "409": "Error", "500": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _create_backup_serialize( + def _add_volume_to_server_serialize( self, project_id, - create_backup_payload, + region, + server_id, + volume_id, + add_volume_to_server_payload, _request_auth, _content_type, _headers, @@ -2505,12 +2774,18 @@ def _create_backup_serialize( # process the path parameters if project_id is not None: _path_params["projectId"] = project_id + if region is not None: + _path_params["region"] = region + if server_id is not None: + _path_params["serverId"] = server_id + if volume_id is not None: + _path_params["volumeId"] = volume_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - if create_backup_payload is not None: - _body_params = create_backup_payload + if add_volume_to_server_payload is not None: + _body_params = add_volume_to_server_payload # set the HTTP header `Accept` if "Accept" not in _header_params: @@ -2528,8 +2803,8 @@ def _create_backup_serialize( _auth_settings: List[str] = [] return self.api_client.param_serialize( - method="POST", - resource_path="/v1/projects/{projectId}/backups", + method="PUT", + resource_path="/v2beta1/projects/{projectId}/regions/{region}/servers/{serverId}/volume-attachments/{volumeId}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2543,13 +2818,16 @@ def _create_backup_serialize( ) @validate_call - def create_image( + def create_affinity_group( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - create_image_payload: Annotated[CreateImagePayload, Field(description="Request an image creation.")], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + create_affinity_group_payload: Annotated[ + CreateAffinityGroupPayload, Field(description="Request a affinity group creation.") + ], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2559,15 +2837,17 @@ def create_image( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ImageCreateResponse: - """Create new Image. + ) -> AffinityGroup: + """Create a new affinity group in a project. - Create a new Image in a project. This call, if successful, returns a pre-signed URL for the customer to upload the image. + Create a new server affinity group in the given project ID. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str - :param create_image_payload: Request an image creation. (required) - :type create_image_payload: CreateImagePayload + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param create_affinity_group_payload: Request a affinity group creation. (required) + :type create_affinity_group_payload: CreateAffinityGroupPayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2590,9 +2870,10 @@ def create_image( :return: Returns the result object. """ # noqa: E501 - _param = self._create_image_serialize( + _param = self._create_affinity_group_serialize( project_id=project_id, - create_image_payload=create_image_payload, + region=region, + create_affinity_group_payload=create_affinity_group_payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2600,12 +2881,11 @@ def create_image( ) _response_types_map: Dict[str, Optional[str]] = { - "201": "ImageCreateResponse", + "201": "AffinityGroup", "400": "Error", "401": "Error", "403": "Error", "404": "Error", - "429": "Error", "500": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -2616,13 +2896,16 @@ def create_image( ).data @validate_call - def create_image_with_http_info( + def create_affinity_group_with_http_info( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - create_image_payload: Annotated[CreateImagePayload, Field(description="Request an image creation.")], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + create_affinity_group_payload: Annotated[ + CreateAffinityGroupPayload, Field(description="Request a affinity group creation.") + ], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2632,15 +2915,17 @@ def create_image_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[ImageCreateResponse]: - """Create new Image. + ) -> ApiResponse[AffinityGroup]: + """Create a new affinity group in a project. - Create a new Image in a project. This call, if successful, returns a pre-signed URL for the customer to upload the image. + Create a new server affinity group in the given project ID. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str - :param create_image_payload: Request an image creation. (required) - :type create_image_payload: CreateImagePayload + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param create_affinity_group_payload: Request a affinity group creation. (required) + :type create_affinity_group_payload: CreateAffinityGroupPayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2663,9 +2948,10 @@ def create_image_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._create_image_serialize( + _param = self._create_affinity_group_serialize( project_id=project_id, - create_image_payload=create_image_payload, + region=region, + create_affinity_group_payload=create_affinity_group_payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2673,12 +2959,11 @@ def create_image_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "201": "ImageCreateResponse", + "201": "AffinityGroup", "400": "Error", "401": "Error", "403": "Error", "404": "Error", - "429": "Error", "500": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -2689,13 +2974,16 @@ def create_image_with_http_info( ) @validate_call - def create_image_without_preload_content( + def create_affinity_group_without_preload_content( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - create_image_payload: Annotated[CreateImagePayload, Field(description="Request an image creation.")], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + create_affinity_group_payload: Annotated[ + CreateAffinityGroupPayload, Field(description="Request a affinity group creation.") + ], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2706,14 +2994,16 @@ def create_image_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Create new Image. + """Create a new affinity group in a project. - Create a new Image in a project. This call, if successful, returns a pre-signed URL for the customer to upload the image. + Create a new server affinity group in the given project ID. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str - :param create_image_payload: Request an image creation. (required) - :type create_image_payload: CreateImagePayload + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param create_affinity_group_payload: Request a affinity group creation. (required) + :type create_affinity_group_payload: CreateAffinityGroupPayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2736,9 +3026,10 @@ def create_image_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._create_image_serialize( + _param = self._create_affinity_group_serialize( project_id=project_id, - create_image_payload=create_image_payload, + region=region, + create_affinity_group_payload=create_affinity_group_payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2746,21 +3037,21 @@ def create_image_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "201": "ImageCreateResponse", + "201": "AffinityGroup", "400": "Error", "401": "Error", "403": "Error", "404": "Error", - "429": "Error", "500": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _create_image_serialize( + def _create_affinity_group_serialize( self, project_id, - create_image_payload, + region, + create_affinity_group_payload, _request_auth, _content_type, _headers, @@ -2781,12 +3072,14 @@ def _create_image_serialize( # process the path parameters if project_id is not None: _path_params["projectId"] = project_id + if region is not None: + _path_params["region"] = region # process the query parameters # process the header parameters # process the form parameters # process the body parameter - if create_image_payload is not None: - _body_params = create_image_payload + if create_affinity_group_payload is not None: + _body_params = create_affinity_group_payload # set the HTTP header `Accept` if "Accept" not in _header_params: @@ -2805,7 +3098,7 @@ def _create_image_serialize( return self.api_client.param_serialize( method="POST", - resource_path="/v1/projects/{projectId}/images", + resource_path="/v2beta1/projects/{projectId}/regions/{region}/affinity-groups", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2819,9 +3112,14 @@ def _create_image_serialize( ) @validate_call - def create_key_pair( + def create_backup( self, - create_key_pair_payload: Annotated[CreateKeyPairPayload, Field(description="Request a public key import.")], + project_id: Annotated[ + str, + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), + ], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + create_backup_payload: Annotated[CreateBackupPayload, Field(description="Request a backup creation.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2831,13 +3129,17 @@ def create_key_pair( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> Keypair: - """Import a public key. + ) -> Backup: + """Create new Backup. - Import a new public key for the requesting user based on provided public key material. The creation will fail if an SSH keypair with the same name already exists. If a name is not provided it is autogenerated form the ssh-pubkey comment section. If that is also not present it will be the the MD5 fingerprint of the key. For autogenerated names invalid characters will be removed. Supported keypair types are ecdsa, ed25519 and rsa. + Create a new Backup in a project. If a snapshot ID is provided create the backup from the snapshot. - :param create_key_pair_payload: Request a public key import. (required) - :type create_key_pair_payload: CreateKeyPairPayload + :param project_id: The identifier (ID) of a STACKIT Project. (required) + :type project_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param create_backup_payload: Request a backup creation. (required) + :type create_backup_payload: CreateBackupPayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2860,8 +3162,10 @@ def create_key_pair( :return: Returns the result object. """ # noqa: E501 - _param = self._create_key_pair_serialize( - create_key_pair_payload=create_key_pair_payload, + _param = self._create_backup_serialize( + project_id=project_id, + region=region, + create_backup_payload=create_backup_payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2869,12 +3173,11 @@ def create_key_pair( ) _response_types_map: Dict[str, Optional[str]] = { - "201": "Keypair", + "201": "Backup", "400": "Error", "401": "Error", "403": "Error", "404": "Error", - "409": "Error", "500": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -2885,9 +3188,14 @@ def create_key_pair( ).data @validate_call - def create_key_pair_with_http_info( + def create_backup_with_http_info( self, - create_key_pair_payload: Annotated[CreateKeyPairPayload, Field(description="Request a public key import.")], + project_id: Annotated[ + str, + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), + ], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + create_backup_payload: Annotated[CreateBackupPayload, Field(description="Request a backup creation.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2897,13 +3205,17 @@ def create_key_pair_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[Keypair]: - """Import a public key. + ) -> ApiResponse[Backup]: + """Create new Backup. - Import a new public key for the requesting user based on provided public key material. The creation will fail if an SSH keypair with the same name already exists. If a name is not provided it is autogenerated form the ssh-pubkey comment section. If that is also not present it will be the the MD5 fingerprint of the key. For autogenerated names invalid characters will be removed. Supported keypair types are ecdsa, ed25519 and rsa. + Create a new Backup in a project. If a snapshot ID is provided create the backup from the snapshot. - :param create_key_pair_payload: Request a public key import. (required) - :type create_key_pair_payload: CreateKeyPairPayload + :param project_id: The identifier (ID) of a STACKIT Project. (required) + :type project_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param create_backup_payload: Request a backup creation. (required) + :type create_backup_payload: CreateBackupPayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2926,8 +3238,10 @@ def create_key_pair_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._create_key_pair_serialize( - create_key_pair_payload=create_key_pair_payload, + _param = self._create_backup_serialize( + project_id=project_id, + region=region, + create_backup_payload=create_backup_payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2935,12 +3249,11 @@ def create_key_pair_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "201": "Keypair", + "201": "Backup", "400": "Error", "401": "Error", "403": "Error", "404": "Error", - "409": "Error", "500": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -2951,9 +3264,14 @@ def create_key_pair_with_http_info( ) @validate_call - def create_key_pair_without_preload_content( + def create_backup_without_preload_content( self, - create_key_pair_payload: Annotated[CreateKeyPairPayload, Field(description="Request a public key import.")], + project_id: Annotated[ + str, + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), + ], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + create_backup_payload: Annotated[CreateBackupPayload, Field(description="Request a backup creation.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2964,12 +3282,16 @@ def create_key_pair_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Import a public key. + """Create new Backup. - Import a new public key for the requesting user based on provided public key material. The creation will fail if an SSH keypair with the same name already exists. If a name is not provided it is autogenerated form the ssh-pubkey comment section. If that is also not present it will be the the MD5 fingerprint of the key. For autogenerated names invalid characters will be removed. Supported keypair types are ecdsa, ed25519 and rsa. + Create a new Backup in a project. If a snapshot ID is provided create the backup from the snapshot. - :param create_key_pair_payload: Request a public key import. (required) - :type create_key_pair_payload: CreateKeyPairPayload + :param project_id: The identifier (ID) of a STACKIT Project. (required) + :type project_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param create_backup_payload: Request a backup creation. (required) + :type create_backup_payload: CreateBackupPayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2992,8 +3314,10 @@ def create_key_pair_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._create_key_pair_serialize( - create_key_pair_payload=create_key_pair_payload, + _param = self._create_backup_serialize( + project_id=project_id, + region=region, + create_backup_payload=create_backup_payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -3001,20 +3325,21 @@ def create_key_pair_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "201": "Keypair", + "201": "Backup", "400": "Error", "401": "Error", "403": "Error", "404": "Error", - "409": "Error", "500": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _create_key_pair_serialize( + def _create_backup_serialize( self, - create_key_pair_payload, + project_id, + region, + create_backup_payload, _request_auth, _content_type, _headers, @@ -3033,12 +3358,16 @@ def _create_key_pair_serialize( _body_params: Optional[bytes] = None # process the path parameters + if project_id is not None: + _path_params["projectId"] = project_id + if region is not None: + _path_params["region"] = region # process the query parameters # process the header parameters # process the form parameters # process the body parameter - if create_key_pair_payload is not None: - _body_params = create_key_pair_payload + if create_backup_payload is not None: + _body_params = create_backup_payload # set the HTTP header `Accept` if "Accept" not in _header_params: @@ -3057,7 +3386,7 @@ def _create_key_pair_serialize( return self.api_client.param_serialize( method="POST", - resource_path="/v1/keypairs", + resource_path="/v2beta1/projects/{projectId}/regions/{region}/backups", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -3071,13 +3400,14 @@ def _create_key_pair_serialize( ) @validate_call - def create_network( + def create_image( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - create_network_payload: Annotated[CreateNetworkPayload, Field(description="Request a network creation.")], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + create_image_payload: Annotated[CreateImagePayload, Field(description="Request an image creation.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -3087,15 +3417,17 @@ def create_network( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> Network: - """Create new network. + ) -> ImageCreateResponse: + """Create new Image. - Create a new network in a project. `nameservers` will be filled from `defaultNameservers` of the respective area if not specified. If the project has `internetAccess` enabled and this is the first network in the project this might incur cost. + Create a new Image in a project. This call, if successful, returns a pre-signed URL for the customer to upload the image. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str - :param create_network_payload: Request a network creation. (required) - :type create_network_payload: CreateNetworkPayload + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param create_image_payload: Request an image creation. (required) + :type create_image_payload: CreateImagePayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -3118,9 +3450,10 @@ def create_network( :return: Returns the result object. """ # noqa: E501 - _param = self._create_network_serialize( + _param = self._create_image_serialize( project_id=project_id, - create_network_payload=create_network_payload, + region=region, + create_image_payload=create_image_payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -3128,12 +3461,12 @@ def create_network( ) _response_types_map: Dict[str, Optional[str]] = { - "202": "Network", + "201": "ImageCreateResponse", "400": "Error", "401": "Error", "403": "Error", "404": "Error", - "409": "Error", + "429": "Error", "500": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -3144,13 +3477,14 @@ def create_network( ).data @validate_call - def create_network_with_http_info( + def create_image_with_http_info( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - create_network_payload: Annotated[CreateNetworkPayload, Field(description="Request a network creation.")], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + create_image_payload: Annotated[CreateImagePayload, Field(description="Request an image creation.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -3160,15 +3494,17 @@ def create_network_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[Network]: - """Create new network. + ) -> ApiResponse[ImageCreateResponse]: + """Create new Image. - Create a new network in a project. `nameservers` will be filled from `defaultNameservers` of the respective area if not specified. If the project has `internetAccess` enabled and this is the first network in the project this might incur cost. + Create a new Image in a project. This call, if successful, returns a pre-signed URL for the customer to upload the image. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str - :param create_network_payload: Request a network creation. (required) - :type create_network_payload: CreateNetworkPayload + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param create_image_payload: Request an image creation. (required) + :type create_image_payload: CreateImagePayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -3191,9 +3527,10 @@ def create_network_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._create_network_serialize( + _param = self._create_image_serialize( project_id=project_id, - create_network_payload=create_network_payload, + region=region, + create_image_payload=create_image_payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -3201,12 +3538,12 @@ def create_network_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "202": "Network", + "201": "ImageCreateResponse", "400": "Error", "401": "Error", "403": "Error", "404": "Error", - "409": "Error", + "429": "Error", "500": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -3217,13 +3554,14 @@ def create_network_with_http_info( ) @validate_call - def create_network_without_preload_content( + def create_image_without_preload_content( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - create_network_payload: Annotated[CreateNetworkPayload, Field(description="Request a network creation.")], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + create_image_payload: Annotated[CreateImagePayload, Field(description="Request an image creation.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -3234,14 +3572,16 @@ def create_network_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Create new network. + """Create new Image. - Create a new network in a project. `nameservers` will be filled from `defaultNameservers` of the respective area if not specified. If the project has `internetAccess` enabled and this is the first network in the project this might incur cost. + Create a new Image in a project. This call, if successful, returns a pre-signed URL for the customer to upload the image. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str - :param create_network_payload: Request a network creation. (required) - :type create_network_payload: CreateNetworkPayload + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param create_image_payload: Request an image creation. (required) + :type create_image_payload: CreateImagePayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -3264,9 +3604,10 @@ def create_network_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._create_network_serialize( + _param = self._create_image_serialize( project_id=project_id, - create_network_payload=create_network_payload, + region=region, + create_image_payload=create_image_payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -3274,21 +3615,22 @@ def create_network_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "202": "Network", + "201": "ImageCreateResponse", "400": "Error", "401": "Error", "403": "Error", "404": "Error", - "409": "Error", + "429": "Error", "500": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _create_network_serialize( + def _create_image_serialize( self, project_id, - create_network_payload, + region, + create_image_payload, _request_auth, _content_type, _headers, @@ -3309,12 +3651,14 @@ def _create_network_serialize( # process the path parameters if project_id is not None: _path_params["projectId"] = project_id + if region is not None: + _path_params["region"] = region # process the query parameters # process the header parameters # process the form parameters # process the body parameter - if create_network_payload is not None: - _body_params = create_network_payload + if create_image_payload is not None: + _body_params = create_image_payload # set the HTTP header `Accept` if "Accept" not in _header_params: @@ -3333,7 +3677,7 @@ def _create_network_serialize( return self.api_client.param_serialize( method="POST", - resource_path="/v1/projects/{projectId}/networks", + resource_path="/v2beta1/projects/{projectId}/regions/{region}/images", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -3347,17 +3691,9 @@ def _create_network_serialize( ) @validate_call - def create_network_area( + def create_key_pair( self, - organization_id: Annotated[ - str, - Field( - min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Organization." - ), - ], - create_network_area_payload: Annotated[ - CreateNetworkAreaPayload, Field(description="Request an area creation.") - ], + create_key_pair_payload: Annotated[CreateKeyPairPayload, Field(description="Request a public key import.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -3367,15 +3703,13 @@ def create_network_area( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> NetworkArea: - """Create new network area in an organization. + ) -> Keypair: + """Import a public key. - Create a new network area in an organization. + Import a new public key for the requesting user based on provided public key material. The creation will fail if an SSH keypair with the same name already exists. If a name is not provided it is autogenerated form the ssh-pubkey comment section. If that is also not present it will be the the MD5 fingerprint of the key. For autogenerated names invalid characters will be removed. - :param organization_id: The identifier (ID) of a STACKIT Organization. (required) - :type organization_id: str - :param create_network_area_payload: Request an area creation. (required) - :type create_network_area_payload: CreateNetworkAreaPayload + :param create_key_pair_payload: Request a public key import. (required) + :type create_key_pair_payload: CreateKeyPairPayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -3398,9 +3732,8 @@ def create_network_area( :return: Returns the result object. """ # noqa: E501 - _param = self._create_network_area_serialize( - organization_id=organization_id, - create_network_area_payload=create_network_area_payload, + _param = self._create_key_pair_serialize( + create_key_pair_payload=create_key_pair_payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -3408,11 +3741,12 @@ def create_network_area( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "NetworkArea", + "201": "Keypair", "400": "Error", "401": "Error", "403": "Error", "404": "Error", + "409": "Error", "500": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -3423,17 +3757,9 @@ def create_network_area( ).data @validate_call - def create_network_area_with_http_info( + def create_key_pair_with_http_info( self, - organization_id: Annotated[ - str, - Field( - min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Organization." - ), - ], - create_network_area_payload: Annotated[ - CreateNetworkAreaPayload, Field(description="Request an area creation.") - ], + create_key_pair_payload: Annotated[CreateKeyPairPayload, Field(description="Request a public key import.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -3443,15 +3769,13 @@ def create_network_area_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[NetworkArea]: - """Create new network area in an organization. + ) -> ApiResponse[Keypair]: + """Import a public key. - Create a new network area in an organization. + Import a new public key for the requesting user based on provided public key material. The creation will fail if an SSH keypair with the same name already exists. If a name is not provided it is autogenerated form the ssh-pubkey comment section. If that is also not present it will be the the MD5 fingerprint of the key. For autogenerated names invalid characters will be removed. - :param organization_id: The identifier (ID) of a STACKIT Organization. (required) - :type organization_id: str - :param create_network_area_payload: Request an area creation. (required) - :type create_network_area_payload: CreateNetworkAreaPayload + :param create_key_pair_payload: Request a public key import. (required) + :type create_key_pair_payload: CreateKeyPairPayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -3474,9 +3798,8 @@ def create_network_area_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._create_network_area_serialize( - organization_id=organization_id, - create_network_area_payload=create_network_area_payload, + _param = self._create_key_pair_serialize( + create_key_pair_payload=create_key_pair_payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -3484,11 +3807,12 @@ def create_network_area_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "NetworkArea", + "201": "Keypair", "400": "Error", "401": "Error", "403": "Error", "404": "Error", + "409": "Error", "500": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -3499,17 +3823,9 @@ def create_network_area_with_http_info( ) @validate_call - def create_network_area_without_preload_content( + def create_key_pair_without_preload_content( self, - organization_id: Annotated[ - str, - Field( - min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Organization." - ), - ], - create_network_area_payload: Annotated[ - CreateNetworkAreaPayload, Field(description="Request an area creation.") - ], + create_key_pair_payload: Annotated[CreateKeyPairPayload, Field(description="Request a public key import.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -3520,14 +3836,12 @@ def create_network_area_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Create new network area in an organization. + """Import a public key. - Create a new network area in an organization. + Import a new public key for the requesting user based on provided public key material. The creation will fail if an SSH keypair with the same name already exists. If a name is not provided it is autogenerated form the ssh-pubkey comment section. If that is also not present it will be the the MD5 fingerprint of the key. For autogenerated names invalid characters will be removed. - :param organization_id: The identifier (ID) of a STACKIT Organization. (required) - :type organization_id: str - :param create_network_area_payload: Request an area creation. (required) - :type create_network_area_payload: CreateNetworkAreaPayload + :param create_key_pair_payload: Request a public key import. (required) + :type create_key_pair_payload: CreateKeyPairPayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -3550,9 +3864,8 @@ def create_network_area_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._create_network_area_serialize( - organization_id=organization_id, - create_network_area_payload=create_network_area_payload, + _param = self._create_key_pair_serialize( + create_key_pair_payload=create_key_pair_payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -3560,20 +3873,20 @@ def create_network_area_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "NetworkArea", + "201": "Keypair", "400": "Error", "401": "Error", "403": "Error", "404": "Error", + "409": "Error", "500": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _create_network_area_serialize( + def _create_key_pair_serialize( self, - organization_id, - create_network_area_payload, + create_key_pair_payload, _request_auth, _content_type, _headers, @@ -3592,14 +3905,12 @@ def _create_network_area_serialize( _body_params: Optional[bytes] = None # process the path parameters - if organization_id is not None: - _path_params["organizationId"] = organization_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - if create_network_area_payload is not None: - _body_params = create_network_area_payload + if create_key_pair_payload is not None: + _body_params = create_key_pair_payload # set the HTTP header `Accept` if "Accept" not in _header_params: @@ -3618,7 +3929,7 @@ def _create_network_area_serialize( return self.api_client.param_serialize( method="POST", - resource_path="/v1/organizations/{organizationId}/network-areas", + resource_path="/v2beta1/keypairs", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -3632,22 +3943,15 @@ def _create_network_area_serialize( ) @validate_call - def create_network_area_range( + def create_management_network( self, - organization_id: Annotated[ - str, - Field( - min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Organization." - ), - ], - area_id: Annotated[ + project_id: Annotated[ str, - Field( - min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Network Area." - ), + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - create_network_area_range_payload: Annotated[ - CreateNetworkAreaRangePayload, Field(description="Request an addition of network ranges to an area.") + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + create_management_network_payload: Annotated[ + CreateManagementNetworkPayload, Field(description="Request a management network creation.") ], _request_timeout: Union[ None, @@ -3658,17 +3962,17 @@ def create_network_area_range( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> NetworkRangeListResponse: - """Create new network range in a network area. + ) -> Network: + """Create new management network. - Create a new network range in an existing network area. + Create resources for a management network and gain access to the management transfer network. - :param organization_id: The identifier (ID) of a STACKIT Organization. (required) - :type organization_id: str - :param area_id: The identifier (ID) of a STACKIT Network Area. (required) - :type area_id: str - :param create_network_area_range_payload: Request an addition of network ranges to an area. (required) - :type create_network_area_range_payload: CreateNetworkAreaRangePayload + :param project_id: The identifier (ID) of a STACKIT Project. (required) + :type project_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param create_management_network_payload: Request a management network creation. (required) + :type create_management_network_payload: CreateManagementNetworkPayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -3691,10 +3995,10 @@ def create_network_area_range( :return: Returns the result object. """ # noqa: E501 - _param = self._create_network_area_range_serialize( - organization_id=organization_id, - area_id=area_id, - create_network_area_range_payload=create_network_area_range_payload, + _param = self._create_management_network_serialize( + project_id=project_id, + region=region, + create_management_network_payload=create_management_network_payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -3702,12 +4006,11 @@ def create_network_area_range( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "NetworkRangeListResponse", + "202": "Network", "400": "Error", "401": "Error", "403": "Error", "404": "Error", - "409": "Error", "500": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -3718,22 +4021,15 @@ def create_network_area_range( ).data @validate_call - def create_network_area_range_with_http_info( + def create_management_network_with_http_info( self, - organization_id: Annotated[ - str, - Field( - min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Organization." - ), - ], - area_id: Annotated[ + project_id: Annotated[ str, - Field( - min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Network Area." - ), + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - create_network_area_range_payload: Annotated[ - CreateNetworkAreaRangePayload, Field(description="Request an addition of network ranges to an area.") + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + create_management_network_payload: Annotated[ + CreateManagementNetworkPayload, Field(description="Request a management network creation.") ], _request_timeout: Union[ None, @@ -3744,17 +4040,17 @@ def create_network_area_range_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[NetworkRangeListResponse]: - """Create new network range in a network area. + ) -> ApiResponse[Network]: + """Create new management network. - Create a new network range in an existing network area. + Create resources for a management network and gain access to the management transfer network. - :param organization_id: The identifier (ID) of a STACKIT Organization. (required) - :type organization_id: str - :param area_id: The identifier (ID) of a STACKIT Network Area. (required) - :type area_id: str - :param create_network_area_range_payload: Request an addition of network ranges to an area. (required) - :type create_network_area_range_payload: CreateNetworkAreaRangePayload + :param project_id: The identifier (ID) of a STACKIT Project. (required) + :type project_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param create_management_network_payload: Request a management network creation. (required) + :type create_management_network_payload: CreateManagementNetworkPayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -3777,10 +4073,10 @@ def create_network_area_range_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._create_network_area_range_serialize( - organization_id=organization_id, - area_id=area_id, - create_network_area_range_payload=create_network_area_range_payload, + _param = self._create_management_network_serialize( + project_id=project_id, + region=region, + create_management_network_payload=create_management_network_payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -3788,12 +4084,11 @@ def create_network_area_range_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "NetworkRangeListResponse", + "202": "Network", "400": "Error", "401": "Error", "403": "Error", "404": "Error", - "409": "Error", "500": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -3804,22 +4099,15 @@ def create_network_area_range_with_http_info( ) @validate_call - def create_network_area_range_without_preload_content( + def create_management_network_without_preload_content( self, - organization_id: Annotated[ - str, - Field( - min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Organization." - ), - ], - area_id: Annotated[ + project_id: Annotated[ str, - Field( - min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Network Area." - ), + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - create_network_area_range_payload: Annotated[ - CreateNetworkAreaRangePayload, Field(description="Request an addition of network ranges to an area.") + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + create_management_network_payload: Annotated[ + CreateManagementNetworkPayload, Field(description="Request a management network creation.") ], _request_timeout: Union[ None, @@ -3831,16 +4119,16 @@ def create_network_area_range_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Create new network range in a network area. + """Create new management network. - Create a new network range in an existing network area. + Create resources for a management network and gain access to the management transfer network. - :param organization_id: The identifier (ID) of a STACKIT Organization. (required) - :type organization_id: str - :param area_id: The identifier (ID) of a STACKIT Network Area. (required) - :type area_id: str - :param create_network_area_range_payload: Request an addition of network ranges to an area. (required) - :type create_network_area_range_payload: CreateNetworkAreaRangePayload + :param project_id: The identifier (ID) of a STACKIT Project. (required) + :type project_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param create_management_network_payload: Request a management network creation. (required) + :type create_management_network_payload: CreateManagementNetworkPayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -3863,10 +4151,10 @@ def create_network_area_range_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._create_network_area_range_serialize( - organization_id=organization_id, - area_id=area_id, - create_network_area_range_payload=create_network_area_range_payload, + _param = self._create_management_network_serialize( + project_id=project_id, + region=region, + create_management_network_payload=create_management_network_payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -3874,22 +4162,21 @@ def create_network_area_range_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "NetworkRangeListResponse", + "202": "Network", "400": "Error", "401": "Error", "403": "Error", "404": "Error", - "409": "Error", "500": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _create_network_area_range_serialize( + def _create_management_network_serialize( self, - organization_id, - area_id, - create_network_area_range_payload, + project_id, + region, + create_management_network_payload, _request_auth, _content_type, _headers, @@ -3908,16 +4195,16 @@ def _create_network_area_range_serialize( _body_params: Optional[bytes] = None # process the path parameters - if organization_id is not None: - _path_params["organizationId"] = organization_id - if area_id is not None: - _path_params["areaId"] = area_id + if project_id is not None: + _path_params["projectId"] = project_id + if region is not None: + _path_params["region"] = region # process the query parameters # process the header parameters # process the form parameters # process the body parameter - if create_network_area_range_payload is not None: - _body_params = create_network_area_range_payload + if create_management_network_payload is not None: + _body_params = create_management_network_payload # set the HTTP header `Accept` if "Accept" not in _header_params: @@ -3936,7 +4223,7 @@ def _create_network_area_range_serialize( return self.api_client.param_serialize( method="POST", - resource_path="/v1/organizations/{organizationId}/network-areas/{areaId}/network-ranges", + resource_path="/v2beta1/projects/{projectId}/regions/{region}/management-network", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -3950,22 +4237,16 @@ def _create_network_area_range_serialize( ) @validate_call - def create_network_area_route( + def create_management_network_route( self, - organization_id: Annotated[ - str, - Field( - min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Organization." - ), - ], - area_id: Annotated[ + project_id: Annotated[ str, - Field( - min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Network Area." - ), + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - create_network_area_route_payload: Annotated[ - CreateNetworkAreaRoutePayload, Field(description="Request an addition of routes to an area.") + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + create_management_network_route_payload: Annotated[ + CreateManagementNetworkRoutePayload, + Field(description="Request an addition of routes to a management network."), ], _request_timeout: Union[ None, @@ -3976,17 +4257,17 @@ def create_network_area_route( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RouteListResponse: - """Create new network routes. + ) -> ManagementRouteListResponse: + """Create new management network routes. - Create one or several new network routes in a network area. + Create one or several new routes in a management network. - :param organization_id: The identifier (ID) of a STACKIT Organization. (required) - :type organization_id: str - :param area_id: The identifier (ID) of a STACKIT Network Area. (required) - :type area_id: str - :param create_network_area_route_payload: Request an addition of routes to an area. (required) - :type create_network_area_route_payload: CreateNetworkAreaRoutePayload + :param project_id: The identifier (ID) of a STACKIT Project. (required) + :type project_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param create_management_network_route_payload: Request an addition of routes to a management network. (required) + :type create_management_network_route_payload: CreateManagementNetworkRoutePayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -4009,10 +4290,10 @@ def create_network_area_route( :return: Returns the result object. """ # noqa: E501 - _param = self._create_network_area_route_serialize( - organization_id=organization_id, - area_id=area_id, - create_network_area_route_payload=create_network_area_route_payload, + _param = self._create_management_network_route_serialize( + project_id=project_id, + region=region, + create_management_network_route_payload=create_management_network_route_payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -4020,7 +4301,7 @@ def create_network_area_route( ) _response_types_map: Dict[str, Optional[str]] = { - "202": "RouteListResponse", + "201": "ManagementRouteListResponse", "400": "Error", "401": "Error", "403": "Error", @@ -4036,22 +4317,16 @@ def create_network_area_route( ).data @validate_call - def create_network_area_route_with_http_info( + def create_management_network_route_with_http_info( self, - organization_id: Annotated[ - str, - Field( - min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Organization." - ), - ], - area_id: Annotated[ + project_id: Annotated[ str, - Field( - min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Network Area." - ), + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - create_network_area_route_payload: Annotated[ - CreateNetworkAreaRoutePayload, Field(description="Request an addition of routes to an area.") + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + create_management_network_route_payload: Annotated[ + CreateManagementNetworkRoutePayload, + Field(description="Request an addition of routes to a management network."), ], _request_timeout: Union[ None, @@ -4062,17 +4337,17 @@ def create_network_area_route_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[RouteListResponse]: - """Create new network routes. + ) -> ApiResponse[ManagementRouteListResponse]: + """Create new management network routes. - Create one or several new network routes in a network area. + Create one or several new routes in a management network. - :param organization_id: The identifier (ID) of a STACKIT Organization. (required) - :type organization_id: str - :param area_id: The identifier (ID) of a STACKIT Network Area. (required) - :type area_id: str - :param create_network_area_route_payload: Request an addition of routes to an area. (required) - :type create_network_area_route_payload: CreateNetworkAreaRoutePayload + :param project_id: The identifier (ID) of a STACKIT Project. (required) + :type project_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param create_management_network_route_payload: Request an addition of routes to a management network. (required) + :type create_management_network_route_payload: CreateManagementNetworkRoutePayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -4095,10 +4370,10 @@ def create_network_area_route_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._create_network_area_route_serialize( - organization_id=organization_id, - area_id=area_id, - create_network_area_route_payload=create_network_area_route_payload, + _param = self._create_management_network_route_serialize( + project_id=project_id, + region=region, + create_management_network_route_payload=create_management_network_route_payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -4106,7 +4381,7 @@ def create_network_area_route_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "202": "RouteListResponse", + "201": "ManagementRouteListResponse", "400": "Error", "401": "Error", "403": "Error", @@ -4122,22 +4397,16 @@ def create_network_area_route_with_http_info( ) @validate_call - def create_network_area_route_without_preload_content( + def create_management_network_route_without_preload_content( self, - organization_id: Annotated[ - str, - Field( - min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Organization." - ), - ], - area_id: Annotated[ + project_id: Annotated[ str, - Field( - min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Network Area." - ), + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - create_network_area_route_payload: Annotated[ - CreateNetworkAreaRoutePayload, Field(description="Request an addition of routes to an area.") + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + create_management_network_route_payload: Annotated[ + CreateManagementNetworkRoutePayload, + Field(description="Request an addition of routes to a management network."), ], _request_timeout: Union[ None, @@ -4149,16 +4418,16 @@ def create_network_area_route_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Create new network routes. + """Create new management network routes. - Create one or several new network routes in a network area. + Create one or several new routes in a management network. - :param organization_id: The identifier (ID) of a STACKIT Organization. (required) - :type organization_id: str - :param area_id: The identifier (ID) of a STACKIT Network Area. (required) - :type area_id: str - :param create_network_area_route_payload: Request an addition of routes to an area. (required) - :type create_network_area_route_payload: CreateNetworkAreaRoutePayload + :param project_id: The identifier (ID) of a STACKIT Project. (required) + :type project_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param create_management_network_route_payload: Request an addition of routes to a management network. (required) + :type create_management_network_route_payload: CreateManagementNetworkRoutePayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -4181,10 +4450,10 @@ def create_network_area_route_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._create_network_area_route_serialize( - organization_id=organization_id, - area_id=area_id, - create_network_area_route_payload=create_network_area_route_payload, + _param = self._create_management_network_route_serialize( + project_id=project_id, + region=region, + create_management_network_route_payload=create_management_network_route_payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -4192,7 +4461,7 @@ def create_network_area_route_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "202": "RouteListResponse", + "201": "ManagementRouteListResponse", "400": "Error", "401": "Error", "403": "Error", @@ -4203,11 +4472,11 @@ def create_network_area_route_without_preload_content( response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _create_network_area_route_serialize( + def _create_management_network_route_serialize( self, - organization_id, - area_id, - create_network_area_route_payload, + project_id, + region, + create_management_network_route_payload, _request_auth, _content_type, _headers, @@ -4226,16 +4495,16 @@ def _create_network_area_route_serialize( _body_params: Optional[bytes] = None # process the path parameters - if organization_id is not None: - _path_params["organizationId"] = organization_id - if area_id is not None: - _path_params["areaId"] = area_id + if project_id is not None: + _path_params["projectId"] = project_id + if region is not None: + _path_params["region"] = region # process the query parameters # process the header parameters # process the form parameters # process the body parameter - if create_network_area_route_payload is not None: - _body_params = create_network_area_route_payload + if create_management_network_route_payload is not None: + _body_params = create_management_network_route_payload # set the HTTP header `Accept` if "Accept" not in _header_params: @@ -4254,7 +4523,7 @@ def _create_network_area_route_serialize( return self.api_client.param_serialize( method="POST", - resource_path="/v1/organizations/{organizationId}/network-areas/{areaId}/routes", + resource_path="/v2beta1/projects/{projectId}/regions/{region}/management-network/routes", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -4268,17 +4537,14 @@ def _create_network_area_route_serialize( ) @validate_call - def create_nic( + def create_network( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - network_id: Annotated[ - str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Network."), - ], - create_nic_payload: Annotated[CreateNicPayload, Field(description="Request a network interface creation.")], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + create_network_payload: Annotated[CreateNetworkPayload, Field(description="Request a network creation.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -4288,17 +4554,17 @@ def create_nic( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> NIC: - """Create new network interface. + ) -> Network: + """Create new network. - Create a new network interface in a project. + Create a new network in a project. `nameservers` will be filled from `defaultNameservers` of the respective area if not specified. If the project has `internetAccess` enabled and this is the first network in the project this might incur cost. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str - :param network_id: The identifier (ID) of a STACKIT Network. (required) - :type network_id: str - :param create_nic_payload: Request a network interface creation. (required) - :type create_nic_payload: CreateNicPayload + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param create_network_payload: Request a network creation. (required) + :type create_network_payload: CreateNetworkPayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -4321,10 +4587,10 @@ def create_nic( :return: Returns the result object. """ # noqa: E501 - _param = self._create_nic_serialize( + _param = self._create_network_serialize( project_id=project_id, - network_id=network_id, - create_nic_payload=create_nic_payload, + region=region, + create_network_payload=create_network_payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -4332,13 +4598,12 @@ def create_nic( ) _response_types_map: Dict[str, Optional[str]] = { - "201": "NIC", + "202": "Network", "400": "Error", "401": "Error", "403": "Error", "404": "Error", "409": "Error", - "429": "Error", "500": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -4349,17 +4614,14 @@ def create_nic( ).data @validate_call - def create_nic_with_http_info( + def create_network_with_http_info( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - network_id: Annotated[ - str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Network."), - ], - create_nic_payload: Annotated[CreateNicPayload, Field(description="Request a network interface creation.")], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + create_network_payload: Annotated[CreateNetworkPayload, Field(description="Request a network creation.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -4369,17 +4631,17 @@ def create_nic_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[NIC]: - """Create new network interface. + ) -> ApiResponse[Network]: + """Create new network. - Create a new network interface in a project. + Create a new network in a project. `nameservers` will be filled from `defaultNameservers` of the respective area if not specified. If the project has `internetAccess` enabled and this is the first network in the project this might incur cost. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str - :param network_id: The identifier (ID) of a STACKIT Network. (required) - :type network_id: str - :param create_nic_payload: Request a network interface creation. (required) - :type create_nic_payload: CreateNicPayload + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param create_network_payload: Request a network creation. (required) + :type create_network_payload: CreateNetworkPayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -4402,10 +4664,10 @@ def create_nic_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._create_nic_serialize( + _param = self._create_network_serialize( project_id=project_id, - network_id=network_id, - create_nic_payload=create_nic_payload, + region=region, + create_network_payload=create_network_payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -4413,13 +4675,12 @@ def create_nic_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "201": "NIC", + "202": "Network", "400": "Error", "401": "Error", "403": "Error", "404": "Error", "409": "Error", - "429": "Error", "500": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -4430,17 +4691,14 @@ def create_nic_with_http_info( ) @validate_call - def create_nic_without_preload_content( + def create_network_without_preload_content( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - network_id: Annotated[ - str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Network."), - ], - create_nic_payload: Annotated[CreateNicPayload, Field(description="Request a network interface creation.")], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + create_network_payload: Annotated[CreateNetworkPayload, Field(description="Request a network creation.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -4451,16 +4709,16 @@ def create_nic_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Create new network interface. + """Create new network. - Create a new network interface in a project. + Create a new network in a project. `nameservers` will be filled from `defaultNameservers` of the respective area if not specified. If the project has `internetAccess` enabled and this is the first network in the project this might incur cost. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str - :param network_id: The identifier (ID) of a STACKIT Network. (required) - :type network_id: str - :param create_nic_payload: Request a network interface creation. (required) - :type create_nic_payload: CreateNicPayload + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param create_network_payload: Request a network creation. (required) + :type create_network_payload: CreateNetworkPayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -4483,10 +4741,10 @@ def create_nic_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._create_nic_serialize( + _param = self._create_network_serialize( project_id=project_id, - network_id=network_id, - create_nic_payload=create_nic_payload, + region=region, + create_network_payload=create_network_payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -4494,23 +4752,22 @@ def create_nic_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "201": "NIC", + "202": "Network", "400": "Error", "401": "Error", "403": "Error", "404": "Error", "409": "Error", - "429": "Error", "500": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _create_nic_serialize( + def _create_network_serialize( self, project_id, - network_id, - create_nic_payload, + region, + create_network_payload, _request_auth, _content_type, _headers, @@ -4531,14 +4788,14 @@ def _create_nic_serialize( # process the path parameters if project_id is not None: _path_params["projectId"] = project_id - if network_id is not None: - _path_params["networkId"] = network_id + if region is not None: + _path_params["region"] = region # process the query parameters # process the header parameters # process the form parameters # process the body parameter - if create_nic_payload is not None: - _body_params = create_nic_payload + if create_network_payload is not None: + _body_params = create_network_payload # set the HTTP header `Accept` if "Accept" not in _header_params: @@ -4557,7 +4814,7 @@ def _create_nic_serialize( return self.api_client.param_serialize( method="POST", - resource_path="/v1/projects/{projectId}/networks/{networkId}/nics", + resource_path="/v2beta1/projects/{projectId}/regions/{region}/networks", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -4571,13 +4828,17 @@ def _create_nic_serialize( ) @validate_call - def create_public_ip( + def create_network_area( self, - project_id: Annotated[ + organization_id: Annotated[ str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), + Field( + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Organization." + ), + ], + create_network_area_payload: Annotated[ + CreateNetworkAreaPayload, Field(description="Request an Area creation.") ], - create_public_ip_payload: Annotated[CreatePublicIPPayload, Field(description="Request a public IP creation.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -4587,15 +4848,15 @@ def create_public_ip( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> PublicIp: - """Create new public IP. + ) -> NetworkArea: + """Create new network area in an organization. - Create a new public IP in a project. + Create a new network area in an organization. - :param project_id: The identifier (ID) of a STACKIT Project. (required) - :type project_id: str - :param create_public_ip_payload: Request a public IP creation. (required) - :type create_public_ip_payload: CreatePublicIPPayload + :param organization_id: The identifier (ID) of a STACKIT Organization. (required) + :type organization_id: str + :param create_network_area_payload: Request an Area creation. (required) + :type create_network_area_payload: CreateNetworkAreaPayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -4618,9 +4879,9 @@ def create_public_ip( :return: Returns the result object. """ # noqa: E501 - _param = self._create_public_ip_serialize( - project_id=project_id, - create_public_ip_payload=create_public_ip_payload, + _param = self._create_network_area_serialize( + organization_id=organization_id, + create_network_area_payload=create_network_area_payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -4628,12 +4889,11 @@ def create_public_ip( ) _response_types_map: Dict[str, Optional[str]] = { - "201": "PublicIp", + "201": "NetworkArea", "400": "Error", "401": "Error", "403": "Error", "404": "Error", - "429": "Error", "500": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -4644,13 +4904,17 @@ def create_public_ip( ).data @validate_call - def create_public_ip_with_http_info( + def create_network_area_with_http_info( self, - project_id: Annotated[ + organization_id: Annotated[ str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), + Field( + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Organization." + ), + ], + create_network_area_payload: Annotated[ + CreateNetworkAreaPayload, Field(description="Request an Area creation.") ], - create_public_ip_payload: Annotated[CreatePublicIPPayload, Field(description="Request a public IP creation.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -4660,15 +4924,15 @@ def create_public_ip_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[PublicIp]: - """Create new public IP. + ) -> ApiResponse[NetworkArea]: + """Create new network area in an organization. - Create a new public IP in a project. + Create a new network area in an organization. - :param project_id: The identifier (ID) of a STACKIT Project. (required) - :type project_id: str - :param create_public_ip_payload: Request a public IP creation. (required) - :type create_public_ip_payload: CreatePublicIPPayload + :param organization_id: The identifier (ID) of a STACKIT Organization. (required) + :type organization_id: str + :param create_network_area_payload: Request an Area creation. (required) + :type create_network_area_payload: CreateNetworkAreaPayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -4691,9 +4955,9 @@ def create_public_ip_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._create_public_ip_serialize( - project_id=project_id, - create_public_ip_payload=create_public_ip_payload, + _param = self._create_network_area_serialize( + organization_id=organization_id, + create_network_area_payload=create_network_area_payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -4701,12 +4965,11 @@ def create_public_ip_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "201": "PublicIp", + "201": "NetworkArea", "400": "Error", "401": "Error", "403": "Error", "404": "Error", - "429": "Error", "500": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -4717,13 +4980,17 @@ def create_public_ip_with_http_info( ) @validate_call - def create_public_ip_without_preload_content( + def create_network_area_without_preload_content( self, - project_id: Annotated[ + organization_id: Annotated[ str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), + Field( + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Organization." + ), + ], + create_network_area_payload: Annotated[ + CreateNetworkAreaPayload, Field(description="Request an Area creation.") ], - create_public_ip_payload: Annotated[CreatePublicIPPayload, Field(description="Request a public IP creation.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -4734,14 +5001,14 @@ def create_public_ip_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Create new public IP. + """Create new network area in an organization. - Create a new public IP in a project. + Create a new network area in an organization. - :param project_id: The identifier (ID) of a STACKIT Project. (required) - :type project_id: str - :param create_public_ip_payload: Request a public IP creation. (required) - :type create_public_ip_payload: CreatePublicIPPayload + :param organization_id: The identifier (ID) of a STACKIT Organization. (required) + :type organization_id: str + :param create_network_area_payload: Request an Area creation. (required) + :type create_network_area_payload: CreateNetworkAreaPayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -4764,9 +5031,9 @@ def create_public_ip_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._create_public_ip_serialize( - project_id=project_id, - create_public_ip_payload=create_public_ip_payload, + _param = self._create_network_area_serialize( + organization_id=organization_id, + create_network_area_payload=create_network_area_payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -4774,21 +5041,20 @@ def create_public_ip_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "201": "PublicIp", + "201": "NetworkArea", "400": "Error", "401": "Error", "403": "Error", "404": "Error", - "429": "Error", "500": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _create_public_ip_serialize( + def _create_network_area_serialize( self, - project_id, - create_public_ip_payload, + organization_id, + create_network_area_payload, _request_auth, _content_type, _headers, @@ -4807,14 +5073,14 @@ def _create_public_ip_serialize( _body_params: Optional[bytes] = None # process the path parameters - if project_id is not None: - _path_params["projectId"] = project_id + if organization_id is not None: + _path_params["organizationId"] = organization_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - if create_public_ip_payload is not None: - _body_params = create_public_ip_payload + if create_network_area_payload is not None: + _body_params = create_network_area_payload # set the HTTP header `Accept` if "Accept" not in _header_params: @@ -4833,7 +5099,7 @@ def _create_public_ip_serialize( return self.api_client.param_serialize( method="POST", - resource_path="/v1/projects/{projectId}/public-ips", + resource_path="/v2beta1/organizations/{organizationId}/network-areas", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -4847,14 +5113,23 @@ def _create_public_ip_serialize( ) @validate_call - def create_security_group( + def create_network_area_range( self, - project_id: Annotated[ + organization_id: Annotated[ str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), + Field( + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Organization." + ), ], - create_security_group_payload: Annotated[ - CreateSecurityGroupPayload, Field(description="Request a security group creation.") + area_id: Annotated[ + str, + Field( + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Network Area." + ), + ], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + create_network_area_range_payload: Annotated[ + CreateNetworkAreaRangePayload, Field(description="Request an addition of network ranges to an area.") ], _request_timeout: Union[ None, @@ -4865,15 +5140,19 @@ def create_security_group( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> SecurityGroup: - """Create new security group. + ) -> NetworkRangeListResponse: + """Create new network range in a network area. - Create a new security group in a project. + Create a new network range in an existing network area. - :param project_id: The identifier (ID) of a STACKIT Project. (required) - :type project_id: str - :param create_security_group_payload: Request a security group creation. (required) - :type create_security_group_payload: CreateSecurityGroupPayload + :param organization_id: The identifier (ID) of a STACKIT Organization. (required) + :type organization_id: str + :param area_id: The identifier (ID) of a STACKIT Network Area. (required) + :type area_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param create_network_area_range_payload: Request an addition of network ranges to an area. (required) + :type create_network_area_range_payload: CreateNetworkAreaRangePayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -4896,9 +5175,11 @@ def create_security_group( :return: Returns the result object. """ # noqa: E501 - _param = self._create_security_group_serialize( - project_id=project_id, - create_security_group_payload=create_security_group_payload, + _param = self._create_network_area_range_serialize( + organization_id=organization_id, + area_id=area_id, + region=region, + create_network_area_range_payload=create_network_area_range_payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -4906,11 +5187,12 @@ def create_security_group( ) _response_types_map: Dict[str, Optional[str]] = { - "201": "SecurityGroup", + "201": "NetworkRangeListResponse", "400": "Error", "401": "Error", "403": "Error", "404": "Error", + "409": "Error", "500": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -4921,14 +5203,23 @@ def create_security_group( ).data @validate_call - def create_security_group_with_http_info( + def create_network_area_range_with_http_info( self, - project_id: Annotated[ + organization_id: Annotated[ str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), + Field( + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Organization." + ), ], - create_security_group_payload: Annotated[ - CreateSecurityGroupPayload, Field(description="Request a security group creation.") + area_id: Annotated[ + str, + Field( + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Network Area." + ), + ], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + create_network_area_range_payload: Annotated[ + CreateNetworkAreaRangePayload, Field(description="Request an addition of network ranges to an area.") ], _request_timeout: Union[ None, @@ -4939,15 +5230,19 @@ def create_security_group_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[SecurityGroup]: - """Create new security group. + ) -> ApiResponse[NetworkRangeListResponse]: + """Create new network range in a network area. - Create a new security group in a project. + Create a new network range in an existing network area. - :param project_id: The identifier (ID) of a STACKIT Project. (required) - :type project_id: str - :param create_security_group_payload: Request a security group creation. (required) - :type create_security_group_payload: CreateSecurityGroupPayload + :param organization_id: The identifier (ID) of a STACKIT Organization. (required) + :type organization_id: str + :param area_id: The identifier (ID) of a STACKIT Network Area. (required) + :type area_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param create_network_area_range_payload: Request an addition of network ranges to an area. (required) + :type create_network_area_range_payload: CreateNetworkAreaRangePayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -4970,9 +5265,11 @@ def create_security_group_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._create_security_group_serialize( - project_id=project_id, - create_security_group_payload=create_security_group_payload, + _param = self._create_network_area_range_serialize( + organization_id=organization_id, + area_id=area_id, + region=region, + create_network_area_range_payload=create_network_area_range_payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -4980,11 +5277,12 @@ def create_security_group_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "201": "SecurityGroup", + "201": "NetworkRangeListResponse", "400": "Error", "401": "Error", "403": "Error", "404": "Error", + "409": "Error", "500": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -4995,14 +5293,5740 @@ def create_security_group_with_http_info( ) @validate_call - def create_security_group_without_preload_content( + def create_network_area_range_without_preload_content( self, - project_id: Annotated[ + organization_id: Annotated[ str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), + Field( + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Organization." + ), + ], + area_id: Annotated[ + str, + Field( + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Network Area." + ), + ], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + create_network_area_range_payload: Annotated[ + CreateNetworkAreaRangePayload, Field(description="Request an addition of network ranges to an area.") + ], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Create new network range in a network area. + + Create a new network range in an existing network area. + + :param organization_id: The identifier (ID) of a STACKIT Organization. (required) + :type organization_id: str + :param area_id: The identifier (ID) of a STACKIT Network Area. (required) + :type area_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param create_network_area_range_payload: Request an addition of network ranges to an area. (required) + :type create_network_area_range_payload: CreateNetworkAreaRangePayload + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_network_area_range_serialize( + organization_id=organization_id, + area_id=area_id, + region=region, + create_network_area_range_payload=create_network_area_range_payload, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "201": "NetworkRangeListResponse", + "400": "Error", + "401": "Error", + "403": "Error", + "404": "Error", + "409": "Error", + "500": "Error", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _create_network_area_range_serialize( + self, + organization_id, + area_id, + region, + create_network_area_range_payload, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = {} + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if organization_id is not None: + _path_params["organizationId"] = organization_id + if area_id is not None: + _path_params["areaId"] = area_id + if region is not None: + _path_params["region"] = region + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if create_network_area_range_payload is not None: + _body_params = create_network_area_range_payload + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params["Content-Type"] = _content_type + else: + _default_content_type = self.api_client.select_header_content_type(["application/json"]) + if _default_content_type is not None: + _header_params["Content-Type"] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [] + + return self.api_client.param_serialize( + method="POST", + resource_path="/v2beta1/organizations/{organizationId}/network-areas/{areaId}/regions/{region}/network-ranges", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def create_network_area_route( + self, + organization_id: Annotated[ + str, + Field( + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Organization." + ), + ], + area_id: Annotated[ + str, + Field( + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Network Area." + ), + ], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + create_network_area_route_payload: Annotated[ + CreateNetworkAreaRoutePayload, Field(description="Request an addition of routes to an area.") + ], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RouteListResponse: + """Create new network routes. + + Create one or several new network routes in a network area. + + :param organization_id: The identifier (ID) of a STACKIT Organization. (required) + :type organization_id: str + :param area_id: The identifier (ID) of a STACKIT Network Area. (required) + :type area_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param create_network_area_route_payload: Request an addition of routes to an area. (required) + :type create_network_area_route_payload: CreateNetworkAreaRoutePayload + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_network_area_route_serialize( + organization_id=organization_id, + area_id=area_id, + region=region, + create_network_area_route_payload=create_network_area_route_payload, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "202": "RouteListResponse", + "400": "Error", + "401": "Error", + "403": "Error", + "404": "Error", + "409": "Error", + "500": "Error", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def create_network_area_route_with_http_info( + self, + organization_id: Annotated[ + str, + Field( + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Organization." + ), + ], + area_id: Annotated[ + str, + Field( + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Network Area." + ), + ], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + create_network_area_route_payload: Annotated[ + CreateNetworkAreaRoutePayload, Field(description="Request an addition of routes to an area.") + ], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[RouteListResponse]: + """Create new network routes. + + Create one or several new network routes in a network area. + + :param organization_id: The identifier (ID) of a STACKIT Organization. (required) + :type organization_id: str + :param area_id: The identifier (ID) of a STACKIT Network Area. (required) + :type area_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param create_network_area_route_payload: Request an addition of routes to an area. (required) + :type create_network_area_route_payload: CreateNetworkAreaRoutePayload + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_network_area_route_serialize( + organization_id=organization_id, + area_id=area_id, + region=region, + create_network_area_route_payload=create_network_area_route_payload, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "202": "RouteListResponse", + "400": "Error", + "401": "Error", + "403": "Error", + "404": "Error", + "409": "Error", + "500": "Error", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def create_network_area_route_without_preload_content( + self, + organization_id: Annotated[ + str, + Field( + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Organization." + ), + ], + area_id: Annotated[ + str, + Field( + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Network Area." + ), + ], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + create_network_area_route_payload: Annotated[ + CreateNetworkAreaRoutePayload, Field(description="Request an addition of routes to an area.") + ], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Create new network routes. + + Create one or several new network routes in a network area. + + :param organization_id: The identifier (ID) of a STACKIT Organization. (required) + :type organization_id: str + :param area_id: The identifier (ID) of a STACKIT Network Area. (required) + :type area_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param create_network_area_route_payload: Request an addition of routes to an area. (required) + :type create_network_area_route_payload: CreateNetworkAreaRoutePayload + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_network_area_route_serialize( + organization_id=organization_id, + area_id=area_id, + region=region, + create_network_area_route_payload=create_network_area_route_payload, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "202": "RouteListResponse", + "400": "Error", + "401": "Error", + "403": "Error", + "404": "Error", + "409": "Error", + "500": "Error", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _create_network_area_route_serialize( + self, + organization_id, + area_id, + region, + create_network_area_route_payload, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = {} + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if organization_id is not None: + _path_params["organizationId"] = organization_id + if area_id is not None: + _path_params["areaId"] = area_id + if region is not None: + _path_params["region"] = region + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if create_network_area_route_payload is not None: + _body_params = create_network_area_route_payload + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params["Content-Type"] = _content_type + else: + _default_content_type = self.api_client.select_header_content_type(["application/json"]) + if _default_content_type is not None: + _header_params["Content-Type"] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [] + + return self.api_client.param_serialize( + method="POST", + resource_path="/v2beta1/organizations/{organizationId}/network-areas/{areaId}/regions/{region}/routes", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def create_nic( + self, + project_id: Annotated[ + str, + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), + ], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + network_id: Annotated[ + str, + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Network."), + ], + create_nic_payload: Annotated[CreateNicPayload, Field(description="Request a network interface creation.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> NIC: + """Create new network interface. + + Create a new network interface in a project. + + :param project_id: The identifier (ID) of a STACKIT Project. (required) + :type project_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param network_id: The identifier (ID) of a STACKIT Network. (required) + :type network_id: str + :param create_nic_payload: Request a network interface creation. (required) + :type create_nic_payload: CreateNicPayload + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_nic_serialize( + project_id=project_id, + region=region, + network_id=network_id, + create_nic_payload=create_nic_payload, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "201": "NIC", + "400": "Error", + "401": "Error", + "403": "Error", + "404": "Error", + "409": "Error", + "429": "Error", + "500": "Error", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def create_nic_with_http_info( + self, + project_id: Annotated[ + str, + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), + ], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + network_id: Annotated[ + str, + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Network."), + ], + create_nic_payload: Annotated[CreateNicPayload, Field(description="Request a network interface creation.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[NIC]: + """Create new network interface. + + Create a new network interface in a project. + + :param project_id: The identifier (ID) of a STACKIT Project. (required) + :type project_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param network_id: The identifier (ID) of a STACKIT Network. (required) + :type network_id: str + :param create_nic_payload: Request a network interface creation. (required) + :type create_nic_payload: CreateNicPayload + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_nic_serialize( + project_id=project_id, + region=region, + network_id=network_id, + create_nic_payload=create_nic_payload, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "201": "NIC", + "400": "Error", + "401": "Error", + "403": "Error", + "404": "Error", + "409": "Error", + "429": "Error", + "500": "Error", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def create_nic_without_preload_content( + self, + project_id: Annotated[ + str, + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), + ], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + network_id: Annotated[ + str, + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Network."), + ], + create_nic_payload: Annotated[CreateNicPayload, Field(description="Request a network interface creation.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Create new network interface. + + Create a new network interface in a project. + + :param project_id: The identifier (ID) of a STACKIT Project. (required) + :type project_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param network_id: The identifier (ID) of a STACKIT Network. (required) + :type network_id: str + :param create_nic_payload: Request a network interface creation. (required) + :type create_nic_payload: CreateNicPayload + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_nic_serialize( + project_id=project_id, + region=region, + network_id=network_id, + create_nic_payload=create_nic_payload, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "201": "NIC", + "400": "Error", + "401": "Error", + "403": "Error", + "404": "Error", + "409": "Error", + "429": "Error", + "500": "Error", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _create_nic_serialize( + self, + project_id, + region, + network_id, + create_nic_payload, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = {} + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if project_id is not None: + _path_params["projectId"] = project_id + if region is not None: + _path_params["region"] = region + if network_id is not None: + _path_params["networkId"] = network_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if create_nic_payload is not None: + _body_params = create_nic_payload + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params["Content-Type"] = _content_type + else: + _default_content_type = self.api_client.select_header_content_type(["application/json"]) + if _default_content_type is not None: + _header_params["Content-Type"] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [] + + return self.api_client.param_serialize( + method="POST", + resource_path="/v2beta1/projects/{projectId}/regions/{region}/networks/{networkId}/nics", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def create_public_ip( + self, + project_id: Annotated[ + str, + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), + ], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + create_public_ip_payload: Annotated[CreatePublicIPPayload, Field(description="Request a public IP creation.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> PublicIp: + """Create new public IP. + + Create a new public IP in a project. + + :param project_id: The identifier (ID) of a STACKIT Project. (required) + :type project_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param create_public_ip_payload: Request a public IP creation. (required) + :type create_public_ip_payload: CreatePublicIPPayload + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_public_ip_serialize( + project_id=project_id, + region=region, + create_public_ip_payload=create_public_ip_payload, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "201": "PublicIp", + "400": "Error", + "401": "Error", + "403": "Error", + "404": "Error", + "429": "Error", + "500": "Error", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def create_public_ip_with_http_info( + self, + project_id: Annotated[ + str, + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), + ], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + create_public_ip_payload: Annotated[CreatePublicIPPayload, Field(description="Request a public IP creation.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[PublicIp]: + """Create new public IP. + + Create a new public IP in a project. + + :param project_id: The identifier (ID) of a STACKIT Project. (required) + :type project_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param create_public_ip_payload: Request a public IP creation. (required) + :type create_public_ip_payload: CreatePublicIPPayload + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_public_ip_serialize( + project_id=project_id, + region=region, + create_public_ip_payload=create_public_ip_payload, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "201": "PublicIp", + "400": "Error", + "401": "Error", + "403": "Error", + "404": "Error", + "429": "Error", + "500": "Error", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def create_public_ip_without_preload_content( + self, + project_id: Annotated[ + str, + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), + ], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + create_public_ip_payload: Annotated[CreatePublicIPPayload, Field(description="Request a public IP creation.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Create new public IP. + + Create a new public IP in a project. + + :param project_id: The identifier (ID) of a STACKIT Project. (required) + :type project_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param create_public_ip_payload: Request a public IP creation. (required) + :type create_public_ip_payload: CreatePublicIPPayload + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_public_ip_serialize( + project_id=project_id, + region=region, + create_public_ip_payload=create_public_ip_payload, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "201": "PublicIp", + "400": "Error", + "401": "Error", + "403": "Error", + "404": "Error", + "429": "Error", + "500": "Error", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _create_public_ip_serialize( + self, + project_id, + region, + create_public_ip_payload, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = {} + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if project_id is not None: + _path_params["projectId"] = project_id + if region is not None: + _path_params["region"] = region + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if create_public_ip_payload is not None: + _body_params = create_public_ip_payload + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params["Content-Type"] = _content_type + else: + _default_content_type = self.api_client.select_header_content_type(["application/json"]) + if _default_content_type is not None: + _header_params["Content-Type"] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [] + + return self.api_client.param_serialize( + method="POST", + resource_path="/v2beta1/projects/{projectId}/regions/{region}/public-ips", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def create_security_group( + self, + project_id: Annotated[ + str, + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), + ], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + create_security_group_payload: Annotated[ + CreateSecurityGroupPayload, Field(description="Request a security group creation.") + ], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SecurityGroup: + """Create new security group. + + Create a new security group in a project. + + :param project_id: The identifier (ID) of a STACKIT Project. (required) + :type project_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param create_security_group_payload: Request a security group creation. (required) + :type create_security_group_payload: CreateSecurityGroupPayload + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_security_group_serialize( + project_id=project_id, + region=region, + create_security_group_payload=create_security_group_payload, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "201": "SecurityGroup", + "400": "Error", + "401": "Error", + "403": "Error", + "404": "Error", + "500": "Error", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def create_security_group_with_http_info( + self, + project_id: Annotated[ + str, + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), + ], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + create_security_group_payload: Annotated[ + CreateSecurityGroupPayload, Field(description="Request a security group creation.") + ], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SecurityGroup]: + """Create new security group. + + Create a new security group in a project. + + :param project_id: The identifier (ID) of a STACKIT Project. (required) + :type project_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param create_security_group_payload: Request a security group creation. (required) + :type create_security_group_payload: CreateSecurityGroupPayload + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_security_group_serialize( + project_id=project_id, + region=region, + create_security_group_payload=create_security_group_payload, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "201": "SecurityGroup", + "400": "Error", + "401": "Error", + "403": "Error", + "404": "Error", + "500": "Error", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def create_security_group_without_preload_content( + self, + project_id: Annotated[ + str, + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), + ], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + create_security_group_payload: Annotated[ + CreateSecurityGroupPayload, Field(description="Request a security group creation.") + ], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Create new security group. + + Create a new security group in a project. + + :param project_id: The identifier (ID) of a STACKIT Project. (required) + :type project_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param create_security_group_payload: Request a security group creation. (required) + :type create_security_group_payload: CreateSecurityGroupPayload + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_security_group_serialize( + project_id=project_id, + region=region, + create_security_group_payload=create_security_group_payload, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "201": "SecurityGroup", + "400": "Error", + "401": "Error", + "403": "Error", + "404": "Error", + "500": "Error", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _create_security_group_serialize( + self, + project_id, + region, + create_security_group_payload, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = {} + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if project_id is not None: + _path_params["projectId"] = project_id + if region is not None: + _path_params["region"] = region + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if create_security_group_payload is not None: + _body_params = create_security_group_payload + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params["Content-Type"] = _content_type + else: + _default_content_type = self.api_client.select_header_content_type(["application/json"]) + if _default_content_type is not None: + _header_params["Content-Type"] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [] + + return self.api_client.param_serialize( + method="POST", + resource_path="/v2beta1/projects/{projectId}/regions/{region}/security-groups", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def create_security_group_rule( + self, + project_id: Annotated[ + str, + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), + ], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + security_group_id: Annotated[ + str, + Field( + min_length=36, + strict=True, + max_length=36, + description="The identifier (ID) of a STACKIT Security Group.", + ), + ], + create_security_group_rule_payload: Annotated[ + CreateSecurityGroupRulePayload, Field(description="Request for a security group rule creation.") + ], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SecurityGroupRule: + """Create new security group rule. + + Create a new security group rule in a project. + + :param project_id: The identifier (ID) of a STACKIT Project. (required) + :type project_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param security_group_id: The identifier (ID) of a STACKIT Security Group. (required) + :type security_group_id: str + :param create_security_group_rule_payload: Request for a security group rule creation. (required) + :type create_security_group_rule_payload: CreateSecurityGroupRulePayload + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_security_group_rule_serialize( + project_id=project_id, + region=region, + security_group_id=security_group_id, + create_security_group_rule_payload=create_security_group_rule_payload, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "201": "SecurityGroupRule", + "400": "Error", + "401": "Error", + "403": "Error", + "404": "Error", + "500": "Error", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def create_security_group_rule_with_http_info( + self, + project_id: Annotated[ + str, + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), + ], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + security_group_id: Annotated[ + str, + Field( + min_length=36, + strict=True, + max_length=36, + description="The identifier (ID) of a STACKIT Security Group.", + ), + ], + create_security_group_rule_payload: Annotated[ + CreateSecurityGroupRulePayload, Field(description="Request for a security group rule creation.") + ], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SecurityGroupRule]: + """Create new security group rule. + + Create a new security group rule in a project. + + :param project_id: The identifier (ID) of a STACKIT Project. (required) + :type project_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param security_group_id: The identifier (ID) of a STACKIT Security Group. (required) + :type security_group_id: str + :param create_security_group_rule_payload: Request for a security group rule creation. (required) + :type create_security_group_rule_payload: CreateSecurityGroupRulePayload + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_security_group_rule_serialize( + project_id=project_id, + region=region, + security_group_id=security_group_id, + create_security_group_rule_payload=create_security_group_rule_payload, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "201": "SecurityGroupRule", + "400": "Error", + "401": "Error", + "403": "Error", + "404": "Error", + "500": "Error", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def create_security_group_rule_without_preload_content( + self, + project_id: Annotated[ + str, + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), + ], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + security_group_id: Annotated[ + str, + Field( + min_length=36, + strict=True, + max_length=36, + description="The identifier (ID) of a STACKIT Security Group.", + ), + ], + create_security_group_rule_payload: Annotated[ + CreateSecurityGroupRulePayload, Field(description="Request for a security group rule creation.") + ], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Create new security group rule. + + Create a new security group rule in a project. + + :param project_id: The identifier (ID) of a STACKIT Project. (required) + :type project_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param security_group_id: The identifier (ID) of a STACKIT Security Group. (required) + :type security_group_id: str + :param create_security_group_rule_payload: Request for a security group rule creation. (required) + :type create_security_group_rule_payload: CreateSecurityGroupRulePayload + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_security_group_rule_serialize( + project_id=project_id, + region=region, + security_group_id=security_group_id, + create_security_group_rule_payload=create_security_group_rule_payload, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "201": "SecurityGroupRule", + "400": "Error", + "401": "Error", + "403": "Error", + "404": "Error", + "500": "Error", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _create_security_group_rule_serialize( + self, + project_id, + region, + security_group_id, + create_security_group_rule_payload, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = {} + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if project_id is not None: + _path_params["projectId"] = project_id + if region is not None: + _path_params["region"] = region + if security_group_id is not None: + _path_params["securityGroupId"] = security_group_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if create_security_group_rule_payload is not None: + _body_params = create_security_group_rule_payload + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params["Content-Type"] = _content_type + else: + _default_content_type = self.api_client.select_header_content_type(["application/json"]) + if _default_content_type is not None: + _header_params["Content-Type"] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [] + + return self.api_client.param_serialize( + method="POST", + resource_path="/v2beta1/projects/{projectId}/regions/{region}/security-groups/{securityGroupId}/rules", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def create_server( + self, + project_id: Annotated[ + str, + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), + ], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + create_server_payload: Annotated[CreateServerPayload, Field(description="Request a server creation.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> Server: + """Create new server. + + Create a new server in a project. + + :param project_id: The identifier (ID) of a STACKIT Project. (required) + :type project_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param create_server_payload: Request a server creation. (required) + :type create_server_payload: CreateServerPayload + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_server_serialize( + project_id=project_id, + region=region, + create_server_payload=create_server_payload, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "201": "Server", + "400": "Error", + "401": "Error", + "403": "Error", + "404": "Error", + "500": "Error", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def create_server_with_http_info( + self, + project_id: Annotated[ + str, + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), + ], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + create_server_payload: Annotated[CreateServerPayload, Field(description="Request a server creation.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[Server]: + """Create new server. + + Create a new server in a project. + + :param project_id: The identifier (ID) of a STACKIT Project. (required) + :type project_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param create_server_payload: Request a server creation. (required) + :type create_server_payload: CreateServerPayload + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_server_serialize( + project_id=project_id, + region=region, + create_server_payload=create_server_payload, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "201": "Server", + "400": "Error", + "401": "Error", + "403": "Error", + "404": "Error", + "500": "Error", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def create_server_without_preload_content( + self, + project_id: Annotated[ + str, + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), + ], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + create_server_payload: Annotated[CreateServerPayload, Field(description="Request a server creation.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Create new server. + + Create a new server in a project. + + :param project_id: The identifier (ID) of a STACKIT Project. (required) + :type project_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param create_server_payload: Request a server creation. (required) + :type create_server_payload: CreateServerPayload + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_server_serialize( + project_id=project_id, + region=region, + create_server_payload=create_server_payload, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "201": "Server", + "400": "Error", + "401": "Error", + "403": "Error", + "404": "Error", + "500": "Error", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _create_server_serialize( + self, + project_id, + region, + create_server_payload, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = {} + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if project_id is not None: + _path_params["projectId"] = project_id + if region is not None: + _path_params["region"] = region + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if create_server_payload is not None: + _body_params = create_server_payload + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params["Content-Type"] = _content_type + else: + _default_content_type = self.api_client.select_header_content_type(["application/json"]) + if _default_content_type is not None: + _header_params["Content-Type"] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [] + + return self.api_client.param_serialize( + method="POST", + resource_path="/v2beta1/projects/{projectId}/regions/{region}/servers", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def create_volume( + self, + project_id: Annotated[ + str, + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), + ], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + create_volume_payload: Annotated[CreateVolumePayload, Field(description="Request a volume creation.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> Volume: + """Create new volume. + + Create a new volume in a project. If a volume source is not provided, an empty volume will be created. The size property is required if no source or an image source is provided. + + :param project_id: The identifier (ID) of a STACKIT Project. (required) + :type project_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param create_volume_payload: Request a volume creation. (required) + :type create_volume_payload: CreateVolumePayload + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_volume_serialize( + project_id=project_id, + region=region, + create_volume_payload=create_volume_payload, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "201": "Volume", + "400": "Error", + "401": "Error", + "403": "Error", + "404": "Error", + "500": "Error", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def create_volume_with_http_info( + self, + project_id: Annotated[ + str, + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), + ], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + create_volume_payload: Annotated[CreateVolumePayload, Field(description="Request a volume creation.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[Volume]: + """Create new volume. + + Create a new volume in a project. If a volume source is not provided, an empty volume will be created. The size property is required if no source or an image source is provided. + + :param project_id: The identifier (ID) of a STACKIT Project. (required) + :type project_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param create_volume_payload: Request a volume creation. (required) + :type create_volume_payload: CreateVolumePayload + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_volume_serialize( + project_id=project_id, + region=region, + create_volume_payload=create_volume_payload, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "201": "Volume", + "400": "Error", + "401": "Error", + "403": "Error", + "404": "Error", + "500": "Error", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def create_volume_without_preload_content( + self, + project_id: Annotated[ + str, + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), + ], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + create_volume_payload: Annotated[CreateVolumePayload, Field(description="Request a volume creation.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Create new volume. + + Create a new volume in a project. If a volume source is not provided, an empty volume will be created. The size property is required if no source or an image source is provided. + + :param project_id: The identifier (ID) of a STACKIT Project. (required) + :type project_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param create_volume_payload: Request a volume creation. (required) + :type create_volume_payload: CreateVolumePayload + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_volume_serialize( + project_id=project_id, + region=region, + create_volume_payload=create_volume_payload, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "201": "Volume", + "400": "Error", + "401": "Error", + "403": "Error", + "404": "Error", + "500": "Error", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _create_volume_serialize( + self, + project_id, + region, + create_volume_payload, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = {} + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if project_id is not None: + _path_params["projectId"] = project_id + if region is not None: + _path_params["region"] = region + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if create_volume_payload is not None: + _body_params = create_volume_payload + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params["Content-Type"] = _content_type + else: + _default_content_type = self.api_client.select_header_content_type(["application/json"]) + if _default_content_type is not None: + _header_params["Content-Type"] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [] + + return self.api_client.param_serialize( + method="POST", + resource_path="/v2beta1/projects/{projectId}/regions/{region}/volumes", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def deallocate_server( + self, + project_id: Annotated[ + str, + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), + ], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + server_id: Annotated[ + str, + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Server."), + ], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Deallocate an existing server. + + Deallocate an existing server. The server will be removed from the hypervisor so only the volume will be billed. + + :param project_id: The identifier (ID) of a STACKIT Project. (required) + :type project_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param server_id: The identifier (ID) of a STACKIT Server. (required) + :type server_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._deallocate_server_serialize( + project_id=project_id, + region=region, + server_id=server_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "202": None, + "400": "Error", + "401": "Error", + "403": "Error", + "404": "Error", + "409": "Error", + "500": "Error", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def deallocate_server_with_http_info( + self, + project_id: Annotated[ + str, + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), + ], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + server_id: Annotated[ + str, + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Server."), + ], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Deallocate an existing server. + + Deallocate an existing server. The server will be removed from the hypervisor so only the volume will be billed. + + :param project_id: The identifier (ID) of a STACKIT Project. (required) + :type project_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param server_id: The identifier (ID) of a STACKIT Server. (required) + :type server_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._deallocate_server_serialize( + project_id=project_id, + region=region, + server_id=server_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "202": None, + "400": "Error", + "401": "Error", + "403": "Error", + "404": "Error", + "409": "Error", + "500": "Error", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def deallocate_server_without_preload_content( + self, + project_id: Annotated[ + str, + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), + ], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + server_id: Annotated[ + str, + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Server."), + ], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Deallocate an existing server. + + Deallocate an existing server. The server will be removed from the hypervisor so only the volume will be billed. + + :param project_id: The identifier (ID) of a STACKIT Project. (required) + :type project_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param server_id: The identifier (ID) of a STACKIT Server. (required) + :type server_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._deallocate_server_serialize( + project_id=project_id, + region=region, + server_id=server_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "202": None, + "400": "Error", + "401": "Error", + "403": "Error", + "404": "Error", + "409": "Error", + "500": "Error", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _deallocate_server_serialize( + self, + project_id, + region, + server_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = {} + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if project_id is not None: + _path_params["projectId"] = project_id + if region is not None: + _path_params["region"] = region + if server_id is not None: + _path_params["serverId"] = server_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # authentication setting + _auth_settings: List[str] = [] + + return self.api_client.param_serialize( + method="POST", + resource_path="/v2beta1/projects/{projectId}/regions/{region}/servers/{serverId}/deallocate", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def delete_affinity_group( + self, + project_id: Annotated[ + str, + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), + ], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + affinity_group_id: Annotated[ + str, + Field( + min_length=36, + strict=True, + max_length=36, + description="The identifier (ID) of a STACKIT Affinity Group.", + ), + ], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Delete a affinity group in a project. + + Delete a affinity group in the given project. + + :param project_id: The identifier (ID) of a STACKIT Project. (required) + :type project_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param affinity_group_id: The identifier (ID) of a STACKIT Affinity Group. (required) + :type affinity_group_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_affinity_group_serialize( + project_id=project_id, + region=region, + affinity_group_id=affinity_group_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "204": None, + "400": "Error", + "401": "Error", + "403": "Error", + "404": "Error", + "500": "Error", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def delete_affinity_group_with_http_info( + self, + project_id: Annotated[ + str, + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), + ], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + affinity_group_id: Annotated[ + str, + Field( + min_length=36, + strict=True, + max_length=36, + description="The identifier (ID) of a STACKIT Affinity Group.", + ), + ], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Delete a affinity group in a project. + + Delete a affinity group in the given project. + + :param project_id: The identifier (ID) of a STACKIT Project. (required) + :type project_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param affinity_group_id: The identifier (ID) of a STACKIT Affinity Group. (required) + :type affinity_group_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_affinity_group_serialize( + project_id=project_id, + region=region, + affinity_group_id=affinity_group_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "204": None, + "400": "Error", + "401": "Error", + "403": "Error", + "404": "Error", + "500": "Error", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def delete_affinity_group_without_preload_content( + self, + project_id: Annotated[ + str, + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), + ], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + affinity_group_id: Annotated[ + str, + Field( + min_length=36, + strict=True, + max_length=36, + description="The identifier (ID) of a STACKIT Affinity Group.", + ), + ], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Delete a affinity group in a project. + + Delete a affinity group in the given project. + + :param project_id: The identifier (ID) of a STACKIT Project. (required) + :type project_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param affinity_group_id: The identifier (ID) of a STACKIT Affinity Group. (required) + :type affinity_group_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_affinity_group_serialize( + project_id=project_id, + region=region, + affinity_group_id=affinity_group_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "204": None, + "400": "Error", + "401": "Error", + "403": "Error", + "404": "Error", + "500": "Error", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _delete_affinity_group_serialize( + self, + project_id, + region, + affinity_group_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = {} + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if project_id is not None: + _path_params["projectId"] = project_id + if region is not None: + _path_params["region"] = region + if affinity_group_id is not None: + _path_params["affinityGroupId"] = affinity_group_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # authentication setting + _auth_settings: List[str] = [] + + return self.api_client.param_serialize( + method="DELETE", + resource_path="/v2beta1/projects/{projectId}/regions/{region}/affinity-groups/{affinityGroupId}", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def delete_backup( + self, + project_id: Annotated[ + str, + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), + ], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + backup_id: Annotated[ + str, + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Backup."), + ], + force: Annotated[Optional[StrictBool], Field(description="Force action.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Delete a backup. + + Delete a backup that is part of the project. + + :param project_id: The identifier (ID) of a STACKIT Project. (required) + :type project_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param backup_id: The identifier (ID) of a STACKIT Backup. (required) + :type backup_id: str + :param force: Force action. + :type force: bool + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_backup_serialize( + project_id=project_id, + region=region, + backup_id=backup_id, + force=force, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "204": None, + "400": "Error", + "401": "Error", + "403": "Error", + "404": "Error", + "500": "Error", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def delete_backup_with_http_info( + self, + project_id: Annotated[ + str, + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), + ], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + backup_id: Annotated[ + str, + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Backup."), + ], + force: Annotated[Optional[StrictBool], Field(description="Force action.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Delete a backup. + + Delete a backup that is part of the project. + + :param project_id: The identifier (ID) of a STACKIT Project. (required) + :type project_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param backup_id: The identifier (ID) of a STACKIT Backup. (required) + :type backup_id: str + :param force: Force action. + :type force: bool + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_backup_serialize( + project_id=project_id, + region=region, + backup_id=backup_id, + force=force, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "204": None, + "400": "Error", + "401": "Error", + "403": "Error", + "404": "Error", + "500": "Error", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def delete_backup_without_preload_content( + self, + project_id: Annotated[ + str, + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), + ], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + backup_id: Annotated[ + str, + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Backup."), + ], + force: Annotated[Optional[StrictBool], Field(description="Force action.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Delete a backup. + + Delete a backup that is part of the project. + + :param project_id: The identifier (ID) of a STACKIT Project. (required) + :type project_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param backup_id: The identifier (ID) of a STACKIT Backup. (required) + :type backup_id: str + :param force: Force action. + :type force: bool + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_backup_serialize( + project_id=project_id, + region=region, + backup_id=backup_id, + force=force, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "204": None, + "400": "Error", + "401": "Error", + "403": "Error", + "404": "Error", + "500": "Error", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _delete_backup_serialize( + self, + project_id, + region, + backup_id, + force, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = {} + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if project_id is not None: + _path_params["projectId"] = project_id + if region is not None: + _path_params["region"] = region + if backup_id is not None: + _path_params["backupId"] = backup_id + # process the query parameters + if force is not None: + + _query_params.append(("force", force)) + + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # authentication setting + _auth_settings: List[str] = [] + + return self.api_client.param_serialize( + method="DELETE", + resource_path="/v2beta1/projects/{projectId}/regions/{region}/backups/{backupId}", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def delete_image( + self, + project_id: Annotated[ + str, + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), + ], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + image_id: Annotated[ + str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Image.") + ], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Delete an Image. + + Delete an image that is part of the project. + + :param project_id: The identifier (ID) of a STACKIT Project. (required) + :type project_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param image_id: The identifier (ID) of a STACKIT Image. (required) + :type image_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_image_serialize( + project_id=project_id, + region=region, + image_id=image_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "204": None, + "400": "Error", + "401": "Error", + "403": "Error", + "404": "Error", + "500": "Error", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def delete_image_with_http_info( + self, + project_id: Annotated[ + str, + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), + ], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + image_id: Annotated[ + str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Image.") + ], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Delete an Image. + + Delete an image that is part of the project. + + :param project_id: The identifier (ID) of a STACKIT Project. (required) + :type project_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param image_id: The identifier (ID) of a STACKIT Image. (required) + :type image_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_image_serialize( + project_id=project_id, + region=region, + image_id=image_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "204": None, + "400": "Error", + "401": "Error", + "403": "Error", + "404": "Error", + "500": "Error", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def delete_image_without_preload_content( + self, + project_id: Annotated[ + str, + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), + ], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + image_id: Annotated[ + str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Image.") + ], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Delete an Image. + + Delete an image that is part of the project. + + :param project_id: The identifier (ID) of a STACKIT Project. (required) + :type project_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param image_id: The identifier (ID) of a STACKIT Image. (required) + :type image_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_image_serialize( + project_id=project_id, + region=region, + image_id=image_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "204": None, + "400": "Error", + "401": "Error", + "403": "Error", + "404": "Error", + "500": "Error", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _delete_image_serialize( + self, + project_id, + region, + image_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = {} + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if project_id is not None: + _path_params["projectId"] = project_id + if region is not None: + _path_params["region"] = region + if image_id is not None: + _path_params["imageId"] = image_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # authentication setting + _auth_settings: List[str] = [] + + return self.api_client.param_serialize( + method="DELETE", + resource_path="/v2beta1/projects/{projectId}/regions/{region}/images/{imageId}", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def delete_image_share( + self, + project_id: Annotated[ + str, + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), + ], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + image_id: Annotated[ + str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Image.") + ], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Remove image share. + + Remove the image share. New scope will be local. + + :param project_id: The identifier (ID) of a STACKIT Project. (required) + :type project_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param image_id: The identifier (ID) of a STACKIT Image. (required) + :type image_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_image_share_serialize( + project_id=project_id, + region=region, + image_id=image_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "204": None, + "400": "Error", + "401": "Error", + "403": "Error", + "404": "Error", + "500": "Error", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def delete_image_share_with_http_info( + self, + project_id: Annotated[ + str, + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), + ], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + image_id: Annotated[ + str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Image.") + ], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Remove image share. + + Remove the image share. New scope will be local. + + :param project_id: The identifier (ID) of a STACKIT Project. (required) + :type project_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param image_id: The identifier (ID) of a STACKIT Image. (required) + :type image_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_image_share_serialize( + project_id=project_id, + region=region, + image_id=image_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "204": None, + "400": "Error", + "401": "Error", + "403": "Error", + "404": "Error", + "500": "Error", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def delete_image_share_without_preload_content( + self, + project_id: Annotated[ + str, + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), + ], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + image_id: Annotated[ + str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Image.") + ], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Remove image share. + + Remove the image share. New scope will be local. + + :param project_id: The identifier (ID) of a STACKIT Project. (required) + :type project_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param image_id: The identifier (ID) of a STACKIT Image. (required) + :type image_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_image_share_serialize( + project_id=project_id, + region=region, + image_id=image_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "204": None, + "400": "Error", + "401": "Error", + "403": "Error", + "404": "Error", + "500": "Error", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _delete_image_share_serialize( + self, + project_id, + region, + image_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = {} + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if project_id is not None: + _path_params["projectId"] = project_id + if region is not None: + _path_params["region"] = region + if image_id is not None: + _path_params["imageId"] = image_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # authentication setting + _auth_settings: List[str] = [] + + return self.api_client.param_serialize( + method="DELETE", + resource_path="/v2beta1/projects/{projectId}/regions/{region}/images/{imageId}/share", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def delete_image_share_consumer( + self, + project_id: Annotated[ + str, + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), + ], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + image_id: Annotated[ + str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Image.") + ], + consumer_project_id: Annotated[ + str, + Field( + min_length=36, + strict=True, + max_length=36, + description="The identifier (ID) of a STACKIT Project that consumes an image share.", + ), + ], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Remove an image share consumer. + + Remove consumer from a shared image. + + :param project_id: The identifier (ID) of a STACKIT Project. (required) + :type project_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param image_id: The identifier (ID) of a STACKIT Image. (required) + :type image_id: str + :param consumer_project_id: The identifier (ID) of a STACKIT Project that consumes an image share. (required) + :type consumer_project_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_image_share_consumer_serialize( + project_id=project_id, + region=region, + image_id=image_id, + consumer_project_id=consumer_project_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "204": None, + "400": "Error", + "401": "Error", + "403": "Error", + "404": "Error", + "500": "Error", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def delete_image_share_consumer_with_http_info( + self, + project_id: Annotated[ + str, + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), + ], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + image_id: Annotated[ + str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Image.") + ], + consumer_project_id: Annotated[ + str, + Field( + min_length=36, + strict=True, + max_length=36, + description="The identifier (ID) of a STACKIT Project that consumes an image share.", + ), + ], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Remove an image share consumer. + + Remove consumer from a shared image. + + :param project_id: The identifier (ID) of a STACKIT Project. (required) + :type project_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param image_id: The identifier (ID) of a STACKIT Image. (required) + :type image_id: str + :param consumer_project_id: The identifier (ID) of a STACKIT Project that consumes an image share. (required) + :type consumer_project_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_image_share_consumer_serialize( + project_id=project_id, + region=region, + image_id=image_id, + consumer_project_id=consumer_project_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "204": None, + "400": "Error", + "401": "Error", + "403": "Error", + "404": "Error", + "500": "Error", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def delete_image_share_consumer_without_preload_content( + self, + project_id: Annotated[ + str, + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), + ], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + image_id: Annotated[ + str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Image.") + ], + consumer_project_id: Annotated[ + str, + Field( + min_length=36, + strict=True, + max_length=36, + description="The identifier (ID) of a STACKIT Project that consumes an image share.", + ), + ], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Remove an image share consumer. + + Remove consumer from a shared image. + + :param project_id: The identifier (ID) of a STACKIT Project. (required) + :type project_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param image_id: The identifier (ID) of a STACKIT Image. (required) + :type image_id: str + :param consumer_project_id: The identifier (ID) of a STACKIT Project that consumes an image share. (required) + :type consumer_project_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_image_share_consumer_serialize( + project_id=project_id, + region=region, + image_id=image_id, + consumer_project_id=consumer_project_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "204": None, + "400": "Error", + "401": "Error", + "403": "Error", + "404": "Error", + "500": "Error", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _delete_image_share_consumer_serialize( + self, + project_id, + region, + image_id, + consumer_project_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = {} + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if project_id is not None: + _path_params["projectId"] = project_id + if region is not None: + _path_params["region"] = region + if image_id is not None: + _path_params["imageId"] = image_id + if consumer_project_id is not None: + _path_params["consumerProjectId"] = consumer_project_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # authentication setting + _auth_settings: List[str] = [] + + return self.api_client.param_serialize( + method="DELETE", + resource_path="/v2beta1/projects/{projectId}/regions/{region}/images/{imageId}/share/{consumerProjectId}", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def delete_key_pair( + self, + keypair_name: Annotated[str, Field(strict=True, max_length=127, description="The name of an SSH keypair.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Delete an SSH keypair. + + Delete an SSH keypair from a user. + + :param keypair_name: The name of an SSH keypair. (required) + :type keypair_name: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_key_pair_serialize( + keypair_name=keypair_name, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "204": None, + "400": "Error", + "401": "Error", + "403": "Error", + "404": "Error", + "500": "Error", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def delete_key_pair_with_http_info( + self, + keypair_name: Annotated[str, Field(strict=True, max_length=127, description="The name of an SSH keypair.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Delete an SSH keypair. + + Delete an SSH keypair from a user. + + :param keypair_name: The name of an SSH keypair. (required) + :type keypair_name: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_key_pair_serialize( + keypair_name=keypair_name, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "204": None, + "400": "Error", + "401": "Error", + "403": "Error", + "404": "Error", + "500": "Error", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def delete_key_pair_without_preload_content( + self, + keypair_name: Annotated[str, Field(strict=True, max_length=127, description="The name of an SSH keypair.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Delete an SSH keypair. + + Delete an SSH keypair from a user. + + :param keypair_name: The name of an SSH keypair. (required) + :type keypair_name: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_key_pair_serialize( + keypair_name=keypair_name, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "204": None, + "400": "Error", + "401": "Error", + "403": "Error", + "404": "Error", + "500": "Error", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _delete_key_pair_serialize( + self, + keypair_name, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = {} + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if keypair_name is not None: + _path_params["keypairName"] = keypair_name + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # authentication setting + _auth_settings: List[str] = [] + + return self.api_client.param_serialize( + method="DELETE", + resource_path="/v2beta1/keypairs/{keypairName}", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def delete_management_network_route( + self, + project_id: Annotated[ + str, + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), + ], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + route_id: Annotated[ + str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Route.") + ], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Delete a management network route. + + Delete a management network route and its labels. + + :param project_id: The identifier (ID) of a STACKIT Project. (required) + :type project_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param route_id: The identifier (ID) of a STACKIT Route. (required) + :type route_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_management_network_route_serialize( + project_id=project_id, + region=region, + route_id=route_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "204": None, + "400": "Error", + "401": "Error", + "403": "Error", + "404": "Error", + "500": "Error", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def delete_management_network_route_with_http_info( + self, + project_id: Annotated[ + str, + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), + ], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + route_id: Annotated[ + str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Route.") + ], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Delete a management network route. + + Delete a management network route and its labels. + + :param project_id: The identifier (ID) of a STACKIT Project. (required) + :type project_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param route_id: The identifier (ID) of a STACKIT Route. (required) + :type route_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_management_network_route_serialize( + project_id=project_id, + region=region, + route_id=route_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "204": None, + "400": "Error", + "401": "Error", + "403": "Error", + "404": "Error", + "500": "Error", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def delete_management_network_route_without_preload_content( + self, + project_id: Annotated[ + str, + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), + ], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + route_id: Annotated[ + str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Route.") + ], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Delete a management network route. + + Delete a management network route and its labels. + + :param project_id: The identifier (ID) of a STACKIT Project. (required) + :type project_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param route_id: The identifier (ID) of a STACKIT Route. (required) + :type route_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_management_network_route_serialize( + project_id=project_id, + region=region, + route_id=route_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "204": None, + "400": "Error", + "401": "Error", + "403": "Error", + "404": "Error", + "500": "Error", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _delete_management_network_route_serialize( + self, + project_id, + region, + route_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = {} + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if project_id is not None: + _path_params["projectId"] = project_id + if region is not None: + _path_params["region"] = region + if route_id is not None: + _path_params["routeId"] = route_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # authentication setting + _auth_settings: List[str] = [] + + return self.api_client.param_serialize( + method="DELETE", + resource_path="/v2beta1/projects/{projectId}/regions/{region}/management-network/routes/{routeId}", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def delete_network( + self, + project_id: Annotated[ + str, + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), + ], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + network_id: Annotated[ + str, + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Network."), + ], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Delete network. + + Delete a network. If the network is still in use, the deletion will fail. + + :param project_id: The identifier (ID) of a STACKIT Project. (required) + :type project_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param network_id: The identifier (ID) of a STACKIT Network. (required) + :type network_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_network_serialize( + project_id=project_id, + region=region, + network_id=network_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "202": None, + "400": "Error", + "401": "Error", + "403": "Error", + "404": "Error", + "409": "Error", + "500": "Error", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def delete_network_with_http_info( + self, + project_id: Annotated[ + str, + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), + ], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + network_id: Annotated[ + str, + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Network."), + ], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Delete network. + + Delete a network. If the network is still in use, the deletion will fail. + + :param project_id: The identifier (ID) of a STACKIT Project. (required) + :type project_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param network_id: The identifier (ID) of a STACKIT Network. (required) + :type network_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_network_serialize( + project_id=project_id, + region=region, + network_id=network_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "202": None, + "400": "Error", + "401": "Error", + "403": "Error", + "404": "Error", + "409": "Error", + "500": "Error", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def delete_network_without_preload_content( + self, + project_id: Annotated[ + str, + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), + ], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + network_id: Annotated[ + str, + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Network."), + ], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Delete network. + + Delete a network. If the network is still in use, the deletion will fail. + + :param project_id: The identifier (ID) of a STACKIT Project. (required) + :type project_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param network_id: The identifier (ID) of a STACKIT Network. (required) + :type network_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_network_serialize( + project_id=project_id, + region=region, + network_id=network_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "202": None, + "400": "Error", + "401": "Error", + "403": "Error", + "404": "Error", + "409": "Error", + "500": "Error", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _delete_network_serialize( + self, + project_id, + region, + network_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = {} + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if project_id is not None: + _path_params["projectId"] = project_id + if region is not None: + _path_params["region"] = region + if network_id is not None: + _path_params["networkId"] = network_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # authentication setting + _auth_settings: List[str] = [] + + return self.api_client.param_serialize( + method="DELETE", + resource_path="/v2beta1/projects/{projectId}/regions/{region}/networks/{networkId}", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def delete_network_area( + self, + organization_id: Annotated[ + str, + Field( + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Organization." + ), + ], + area_id: Annotated[ + str, + Field( + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Network Area." + ), + ], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Delete a network area. + + Delete an existing network area in an organization. This is only possible if no projects are using the area anymore. + + :param organization_id: The identifier (ID) of a STACKIT Organization. (required) + :type organization_id: str + :param area_id: The identifier (ID) of a STACKIT Network Area. (required) + :type area_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_network_area_serialize( + organization_id=organization_id, + area_id=area_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "204": None, + "400": "Error", + "401": "Error", + "403": "Error", + "404": "Error", + "409": "Error", + "500": "Error", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def delete_network_area_with_http_info( + self, + organization_id: Annotated[ + str, + Field( + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Organization." + ), + ], + area_id: Annotated[ + str, + Field( + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Network Area." + ), + ], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Delete a network area. + + Delete an existing network area in an organization. This is only possible if no projects are using the area anymore. + + :param organization_id: The identifier (ID) of a STACKIT Organization. (required) + :type organization_id: str + :param area_id: The identifier (ID) of a STACKIT Network Area. (required) + :type area_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_network_area_serialize( + organization_id=organization_id, + area_id=area_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "204": None, + "400": "Error", + "401": "Error", + "403": "Error", + "404": "Error", + "409": "Error", + "500": "Error", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def delete_network_area_without_preload_content( + self, + organization_id: Annotated[ + str, + Field( + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Organization." + ), + ], + area_id: Annotated[ + str, + Field( + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Network Area." + ), + ], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Delete a network area. + + Delete an existing network area in an organization. This is only possible if no projects are using the area anymore. + + :param organization_id: The identifier (ID) of a STACKIT Organization. (required) + :type organization_id: str + :param area_id: The identifier (ID) of a STACKIT Network Area. (required) + :type area_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_network_area_serialize( + organization_id=organization_id, + area_id=area_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "204": None, + "400": "Error", + "401": "Error", + "403": "Error", + "404": "Error", + "409": "Error", + "500": "Error", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _delete_network_area_serialize( + self, + organization_id, + area_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = {} + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if organization_id is not None: + _path_params["organizationId"] = organization_id + if area_id is not None: + _path_params["areaId"] = area_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # authentication setting + _auth_settings: List[str] = [] + + return self.api_client.param_serialize( + method="DELETE", + resource_path="/v2beta1/organizations/{organizationId}/network-areas/{areaId}", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def delete_network_area_range( + self, + organization_id: Annotated[ + str, + Field( + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Organization." + ), + ], + area_id: Annotated[ + str, + Field( + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Network Area." + ), + ], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + network_range_id: Annotated[ + str, + Field( + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Network Range." + ), + ], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Delete a network range. + + Delete a network range of a network area. The deletion will fail if the network range is still used. + + :param organization_id: The identifier (ID) of a STACKIT Organization. (required) + :type organization_id: str + :param area_id: The identifier (ID) of a STACKIT Network Area. (required) + :type area_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param network_range_id: The identifier (ID) of a STACKIT Network Range. (required) + :type network_range_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_network_area_range_serialize( + organization_id=organization_id, + area_id=area_id, + region=region, + network_range_id=network_range_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "202": None, + "400": "Error", + "401": "Error", + "403": "Error", + "404": "Error", + "409": "Error", + "500": "Error", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def delete_network_area_range_with_http_info( + self, + organization_id: Annotated[ + str, + Field( + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Organization." + ), + ], + area_id: Annotated[ + str, + Field( + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Network Area." + ), + ], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + network_range_id: Annotated[ + str, + Field( + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Network Range." + ), + ], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Delete a network range. + + Delete a network range of a network area. The deletion will fail if the network range is still used. + + :param organization_id: The identifier (ID) of a STACKIT Organization. (required) + :type organization_id: str + :param area_id: The identifier (ID) of a STACKIT Network Area. (required) + :type area_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param network_range_id: The identifier (ID) of a STACKIT Network Range. (required) + :type network_range_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_network_area_range_serialize( + organization_id=organization_id, + area_id=area_id, + region=region, + network_range_id=network_range_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "202": None, + "400": "Error", + "401": "Error", + "403": "Error", + "404": "Error", + "409": "Error", + "500": "Error", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def delete_network_area_range_without_preload_content( + self, + organization_id: Annotated[ + str, + Field( + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Organization." + ), + ], + area_id: Annotated[ + str, + Field( + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Network Area." + ), + ], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + network_range_id: Annotated[ + str, + Field( + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Network Range." + ), + ], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Delete a network range. + + Delete a network range of a network area. The deletion will fail if the network range is still used. + + :param organization_id: The identifier (ID) of a STACKIT Organization. (required) + :type organization_id: str + :param area_id: The identifier (ID) of a STACKIT Network Area. (required) + :type area_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param network_range_id: The identifier (ID) of a STACKIT Network Range. (required) + :type network_range_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_network_area_range_serialize( + organization_id=organization_id, + area_id=area_id, + region=region, + network_range_id=network_range_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "202": None, + "400": "Error", + "401": "Error", + "403": "Error", + "404": "Error", + "409": "Error", + "500": "Error", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + return response_data.response + + def _delete_network_area_range_serialize( + self, + organization_id, + area_id, + region, + network_range_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = {} + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if organization_id is not None: + _path_params["organizationId"] = organization_id + if area_id is not None: + _path_params["areaId"] = area_id + if region is not None: + _path_params["region"] = region + if network_range_id is not None: + _path_params["networkRangeId"] = network_range_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + + # authentication setting + _auth_settings: List[str] = [] + + return self.api_client.param_serialize( + method="DELETE", + resource_path="/v2beta1/organizations/{organizationId}/network-areas/{areaId}/regions/{region}/network-ranges/{networkRangeId}", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + + @validate_call + def delete_network_area_route( + self, + organization_id: Annotated[ + str, + Field( + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Organization." + ), + ], + area_id: Annotated[ + str, + Field( + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Network Area." + ), + ], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + route_id: Annotated[ + str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Route.") + ], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Delete a network route. + + Delete a network route of a network area. + + :param organization_id: The identifier (ID) of a STACKIT Organization. (required) + :type organization_id: str + :param area_id: The identifier (ID) of a STACKIT Network Area. (required) + :type area_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param route_id: The identifier (ID) of a STACKIT Route. (required) + :type route_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_network_area_route_serialize( + organization_id=organization_id, + area_id=area_id, + region=region, + route_id=route_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "202": None, + "400": "Error", + "401": "Error", + "403": "Error", + "404": "Error", + "500": "Error", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def delete_network_area_route_with_http_info( + self, + organization_id: Annotated[ + str, + Field( + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Organization." + ), + ], + area_id: Annotated[ + str, + Field( + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Network Area." + ), + ], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + route_id: Annotated[ + str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Route.") + ], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Delete a network route. + + Delete a network route of a network area. + + :param organization_id: The identifier (ID) of a STACKIT Organization. (required) + :type organization_id: str + :param area_id: The identifier (ID) of a STACKIT Network Area. (required) + :type area_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param route_id: The identifier (ID) of a STACKIT Route. (required) + :type route_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_network_area_route_serialize( + organization_id=organization_id, + area_id=area_id, + region=region, + route_id=route_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "202": None, + "400": "Error", + "401": "Error", + "403": "Error", + "404": "Error", + "500": "Error", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def delete_network_area_route_without_preload_content( + self, + organization_id: Annotated[ + str, + Field( + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Organization." + ), + ], + area_id: Annotated[ + str, + Field( + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Network Area." + ), ], - create_security_group_payload: Annotated[ - CreateSecurityGroupPayload, Field(description="Request a security group creation.") + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + route_id: Annotated[ + str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Route.") ], _request_timeout: Union[ None, @@ -5014,14 +11038,18 @@ def create_security_group_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Create new security group. + """Delete a network route. - Create a new security group in a project. + Delete a network route of a network area. - :param project_id: The identifier (ID) of a STACKIT Project. (required) - :type project_id: str - :param create_security_group_payload: Request a security group creation. (required) - :type create_security_group_payload: CreateSecurityGroupPayload + :param organization_id: The identifier (ID) of a STACKIT Organization. (required) + :type organization_id: str + :param area_id: The identifier (ID) of a STACKIT Network Area. (required) + :type area_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param route_id: The identifier (ID) of a STACKIT Route. (required) + :type route_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -5044,9 +11072,11 @@ def create_security_group_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._create_security_group_serialize( - project_id=project_id, - create_security_group_payload=create_security_group_payload, + _param = self._delete_network_area_route_serialize( + organization_id=organization_id, + area_id=area_id, + region=region, + route_id=route_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -5054,7 +11084,7 @@ def create_security_group_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "201": "SecurityGroup", + "202": None, "400": "Error", "401": "Error", "403": "Error", @@ -5064,10 +11094,12 @@ def create_security_group_without_preload_content( response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _create_security_group_serialize( + def _delete_network_area_route_serialize( self, - project_id, - create_security_group_payload, + organization_id, + area_id, + region, + route_id, _request_auth, _content_type, _headers, @@ -5086,33 +11118,29 @@ def _create_security_group_serialize( _body_params: Optional[bytes] = None # process the path parameters - if project_id is not None: - _path_params["projectId"] = project_id + if organization_id is not None: + _path_params["organizationId"] = organization_id + if area_id is not None: + _path_params["areaId"] = area_id + if region is not None: + _path_params["region"] = region + if route_id is not None: + _path_params["routeId"] = route_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - if create_security_group_payload is not None: - _body_params = create_security_group_payload # set the HTTP header `Accept` if "Accept" not in _header_params: _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) - # set the HTTP header `Content-Type` - if _content_type: - _header_params["Content-Type"] = _content_type - else: - _default_content_type = self.api_client.select_header_content_type(["application/json"]) - if _default_content_type is not None: - _header_params["Content-Type"] = _default_content_type - # authentication setting _auth_settings: List[str] = [] return self.api_client.param_serialize( - method="POST", - resource_path="/v1/projects/{projectId}/security-groups", + method="DELETE", + resource_path="/v2beta1/organizations/{organizationId}/network-areas/{areaId}/regions/{region}/routes/{routeId}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -5126,23 +11154,20 @@ def _create_security_group_serialize( ) @validate_call - def create_security_group_rule( + def delete_nic( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - security_group_id: Annotated[ + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + network_id: Annotated[ str, - Field( - min_length=36, - strict=True, - max_length=36, - description="The identifier (ID) of a STACKIT Security Group.", - ), + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Network."), ], - create_security_group_rule_payload: Annotated[ - CreateSecurityGroupRulePayload, Field(description="Request for a security group rule creation.") + nic_id: Annotated[ + str, + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a network interface."), ], _request_timeout: Union[ None, @@ -5153,17 +11178,19 @@ def create_security_group_rule( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> SecurityGroupRule: - """Create new security group rule. + ) -> None: + """Delete a network interface. - Create a new security group rule in a project. + Delete a network interface that is part of the project. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str - :param security_group_id: The identifier (ID) of a STACKIT Security Group. (required) - :type security_group_id: str - :param create_security_group_rule_payload: Request for a security group rule creation. (required) - :type create_security_group_rule_payload: CreateSecurityGroupRulePayload + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param network_id: The identifier (ID) of a STACKIT Network. (required) + :type network_id: str + :param nic_id: The identifier (ID) of a network interface. (required) + :type nic_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -5186,10 +11213,11 @@ def create_security_group_rule( :return: Returns the result object. """ # noqa: E501 - _param = self._create_security_group_rule_serialize( + _param = self._delete_nic_serialize( project_id=project_id, - security_group_id=security_group_id, - create_security_group_rule_payload=create_security_group_rule_payload, + region=region, + network_id=network_id, + nic_id=nic_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -5197,7 +11225,7 @@ def create_security_group_rule( ) _response_types_map: Dict[str, Optional[str]] = { - "201": "SecurityGroupRule", + "204": None, "400": "Error", "401": "Error", "403": "Error", @@ -5212,23 +11240,20 @@ def create_security_group_rule( ).data @validate_call - def create_security_group_rule_with_http_info( + def delete_nic_with_http_info( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - security_group_id: Annotated[ + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + network_id: Annotated[ str, - Field( - min_length=36, - strict=True, - max_length=36, - description="The identifier (ID) of a STACKIT Security Group.", - ), + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Network."), ], - create_security_group_rule_payload: Annotated[ - CreateSecurityGroupRulePayload, Field(description="Request for a security group rule creation.") + nic_id: Annotated[ + str, + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a network interface."), ], _request_timeout: Union[ None, @@ -5239,17 +11264,19 @@ def create_security_group_rule_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[SecurityGroupRule]: - """Create new security group rule. + ) -> ApiResponse[None]: + """Delete a network interface. - Create a new security group rule in a project. + Delete a network interface that is part of the project. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str - :param security_group_id: The identifier (ID) of a STACKIT Security Group. (required) - :type security_group_id: str - :param create_security_group_rule_payload: Request for a security group rule creation. (required) - :type create_security_group_rule_payload: CreateSecurityGroupRulePayload + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param network_id: The identifier (ID) of a STACKIT Network. (required) + :type network_id: str + :param nic_id: The identifier (ID) of a network interface. (required) + :type nic_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -5272,10 +11299,11 @@ def create_security_group_rule_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._create_security_group_rule_serialize( + _param = self._delete_nic_serialize( project_id=project_id, - security_group_id=security_group_id, - create_security_group_rule_payload=create_security_group_rule_payload, + region=region, + network_id=network_id, + nic_id=nic_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -5283,7 +11311,7 @@ def create_security_group_rule_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "201": "SecurityGroupRule", + "204": None, "400": "Error", "401": "Error", "403": "Error", @@ -5298,23 +11326,20 @@ def create_security_group_rule_with_http_info( ) @validate_call - def create_security_group_rule_without_preload_content( + def delete_nic_without_preload_content( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - security_group_id: Annotated[ + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + network_id: Annotated[ str, - Field( - min_length=36, - strict=True, - max_length=36, - description="The identifier (ID) of a STACKIT Security Group.", - ), + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Network."), ], - create_security_group_rule_payload: Annotated[ - CreateSecurityGroupRulePayload, Field(description="Request for a security group rule creation.") + nic_id: Annotated[ + str, + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a network interface."), ], _request_timeout: Union[ None, @@ -5326,16 +11351,18 @@ def create_security_group_rule_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Create new security group rule. + """Delete a network interface. - Create a new security group rule in a project. + Delete a network interface that is part of the project. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str - :param security_group_id: The identifier (ID) of a STACKIT Security Group. (required) - :type security_group_id: str - :param create_security_group_rule_payload: Request for a security group rule creation. (required) - :type create_security_group_rule_payload: CreateSecurityGroupRulePayload + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param network_id: The identifier (ID) of a STACKIT Network. (required) + :type network_id: str + :param nic_id: The identifier (ID) of a network interface. (required) + :type nic_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -5358,10 +11385,11 @@ def create_security_group_rule_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._create_security_group_rule_serialize( + _param = self._delete_nic_serialize( project_id=project_id, - security_group_id=security_group_id, - create_security_group_rule_payload=create_security_group_rule_payload, + region=region, + network_id=network_id, + nic_id=nic_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -5369,7 +11397,7 @@ def create_security_group_rule_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "201": "SecurityGroupRule", + "204": None, "400": "Error", "401": "Error", "403": "Error", @@ -5379,11 +11407,12 @@ def create_security_group_rule_without_preload_content( response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _create_security_group_rule_serialize( + def _delete_nic_serialize( self, project_id, - security_group_id, - create_security_group_rule_payload, + region, + network_id, + nic_id, _request_auth, _content_type, _headers, @@ -5404,33 +11433,27 @@ def _create_security_group_rule_serialize( # process the path parameters if project_id is not None: _path_params["projectId"] = project_id - if security_group_id is not None: - _path_params["securityGroupId"] = security_group_id + if region is not None: + _path_params["region"] = region + if network_id is not None: + _path_params["networkId"] = network_id + if nic_id is not None: + _path_params["nicId"] = nic_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - if create_security_group_rule_payload is not None: - _body_params = create_security_group_rule_payload # set the HTTP header `Accept` if "Accept" not in _header_params: _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) - # set the HTTP header `Content-Type` - if _content_type: - _header_params["Content-Type"] = _content_type - else: - _default_content_type = self.api_client.select_header_content_type(["application/json"]) - if _default_content_type is not None: - _header_params["Content-Type"] = _default_content_type - # authentication setting _auth_settings: List[str] = [] return self.api_client.param_serialize( - method="POST", - resource_path="/v1/projects/{projectId}/security-groups/{securityGroupId}/rules", + method="DELETE", + resource_path="/v2beta1/projects/{projectId}/regions/{region}/networks/{networkId}/nics/{nicId}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -5444,13 +11467,16 @@ def _create_security_group_rule_serialize( ) @validate_call - def create_server( + def delete_public_ip( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - create_server_payload: Annotated[CreateServerPayload, Field(description="Request a server creation.")], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + public_ip_id: Annotated[ + str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a Public IP.") + ], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -5460,15 +11486,17 @@ def create_server( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> Server: - """Create new server. + ) -> None: + """Delete a public IP. - Create a new server in a project. + Delete a public IP that is part of the project. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str - :param create_server_payload: Request a server creation. (required) - :type create_server_payload: CreateServerPayload + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param public_ip_id: The identifier (ID) of a Public IP. (required) + :type public_ip_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -5491,9 +11519,10 @@ def create_server( :return: Returns the result object. """ # noqa: E501 - _param = self._create_server_serialize( + _param = self._delete_public_ip_serialize( project_id=project_id, - create_server_payload=create_server_payload, + region=region, + public_ip_id=public_ip_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -5501,7 +11530,7 @@ def create_server( ) _response_types_map: Dict[str, Optional[str]] = { - "201": "Server", + "204": None, "400": "Error", "401": "Error", "403": "Error", @@ -5516,13 +11545,16 @@ def create_server( ).data @validate_call - def create_server_with_http_info( + def delete_public_ip_with_http_info( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - create_server_payload: Annotated[CreateServerPayload, Field(description="Request a server creation.")], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + public_ip_id: Annotated[ + str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a Public IP.") + ], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -5532,15 +11564,17 @@ def create_server_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[Server]: - """Create new server. + ) -> ApiResponse[None]: + """Delete a public IP. - Create a new server in a project. + Delete a public IP that is part of the project. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str - :param create_server_payload: Request a server creation. (required) - :type create_server_payload: CreateServerPayload + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param public_ip_id: The identifier (ID) of a Public IP. (required) + :type public_ip_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -5563,9 +11597,10 @@ def create_server_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._create_server_serialize( + _param = self._delete_public_ip_serialize( project_id=project_id, - create_server_payload=create_server_payload, + region=region, + public_ip_id=public_ip_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -5573,7 +11608,7 @@ def create_server_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "201": "Server", + "204": None, "400": "Error", "401": "Error", "403": "Error", @@ -5588,13 +11623,16 @@ def create_server_with_http_info( ) @validate_call - def create_server_without_preload_content( + def delete_public_ip_without_preload_content( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - create_server_payload: Annotated[CreateServerPayload, Field(description="Request a server creation.")], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + public_ip_id: Annotated[ + str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a Public IP.") + ], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -5605,14 +11643,16 @@ def create_server_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Create new server. + """Delete a public IP. - Create a new server in a project. + Delete a public IP that is part of the project. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str - :param create_server_payload: Request a server creation. (required) - :type create_server_payload: CreateServerPayload + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param public_ip_id: The identifier (ID) of a Public IP. (required) + :type public_ip_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -5635,9 +11675,10 @@ def create_server_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._create_server_serialize( + _param = self._delete_public_ip_serialize( project_id=project_id, - create_server_payload=create_server_payload, + region=region, + public_ip_id=public_ip_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -5645,7 +11686,7 @@ def create_server_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "201": "Server", + "204": None, "400": "Error", "401": "Error", "403": "Error", @@ -5655,10 +11696,11 @@ def create_server_without_preload_content( response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _create_server_serialize( + def _delete_public_ip_serialize( self, project_id, - create_server_payload, + region, + public_ip_id, _request_auth, _content_type, _headers, @@ -5679,31 +11721,25 @@ def _create_server_serialize( # process the path parameters if project_id is not None: _path_params["projectId"] = project_id + if region is not None: + _path_params["region"] = region + if public_ip_id is not None: + _path_params["publicIpId"] = public_ip_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - if create_server_payload is not None: - _body_params = create_server_payload # set the HTTP header `Accept` if "Accept" not in _header_params: _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) - # set the HTTP header `Content-Type` - if _content_type: - _header_params["Content-Type"] = _content_type - else: - _default_content_type = self.api_client.select_header_content_type(["application/json"]) - if _default_content_type is not None: - _header_params["Content-Type"] = _default_content_type - # authentication setting _auth_settings: List[str] = [] return self.api_client.param_serialize( - method="POST", - resource_path="/v1/projects/{projectId}/servers", + method="DELETE", + resource_path="/v2beta1/projects/{projectId}/regions/{region}/public-ips/{publicIpId}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -5717,13 +11753,30 @@ def _create_server_serialize( ) @validate_call - def create_snapshot( + def delete_route_from_routing_table( self, - project_id: Annotated[ + organization_id: Annotated[ str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), + Field( + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Organization." + ), + ], + area_id: Annotated[ + str, + Field( + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Network Area." + ), + ], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + routing_table_id: Annotated[ + str, + Field( + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Routing Table." + ), + ], + route_id: Annotated[ + str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Route.") ], - create_snapshot_payload: Annotated[CreateSnapshotPayload, Field(description="Request a snapshot creation.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -5733,15 +11786,21 @@ def create_snapshot( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> Snapshot: - """Create new Snapshot. + ) -> None: + """Delete a route in a routing table. - Create a new Snapshot from a Volume in a project. + Delete a route in an existing routing table. - :param project_id: The identifier (ID) of a STACKIT Project. (required) - :type project_id: str - :param create_snapshot_payload: Request a snapshot creation. (required) - :type create_snapshot_payload: CreateSnapshotPayload + :param organization_id: The identifier (ID) of a STACKIT Organization. (required) + :type organization_id: str + :param area_id: The identifier (ID) of a STACKIT Network Area. (required) + :type area_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param routing_table_id: The identifier (ID) of a STACKIT Routing Table. (required) + :type routing_table_id: str + :param route_id: The identifier (ID) of a STACKIT Route. (required) + :type route_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -5764,9 +11823,12 @@ def create_snapshot( :return: Returns the result object. """ # noqa: E501 - _param = self._create_snapshot_serialize( - project_id=project_id, - create_snapshot_payload=create_snapshot_payload, + _param = self._delete_route_from_routing_table_serialize( + organization_id=organization_id, + area_id=area_id, + region=region, + routing_table_id=routing_table_id, + route_id=route_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -5774,7 +11836,7 @@ def create_snapshot( ) _response_types_map: Dict[str, Optional[str]] = { - "201": "Snapshot", + "204": None, "400": "Error", "401": "Error", "403": "Error", @@ -5789,13 +11851,30 @@ def create_snapshot( ).data @validate_call - def create_snapshot_with_http_info( + def delete_route_from_routing_table_with_http_info( self, - project_id: Annotated[ + organization_id: Annotated[ str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), + Field( + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Organization." + ), + ], + area_id: Annotated[ + str, + Field( + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Network Area." + ), + ], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + routing_table_id: Annotated[ + str, + Field( + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Routing Table." + ), + ], + route_id: Annotated[ + str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Route.") ], - create_snapshot_payload: Annotated[CreateSnapshotPayload, Field(description="Request a snapshot creation.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -5805,15 +11884,21 @@ def create_snapshot_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[Snapshot]: - """Create new Snapshot. + ) -> ApiResponse[None]: + """Delete a route in a routing table. - Create a new Snapshot from a Volume in a project. + Delete a route in an existing routing table. - :param project_id: The identifier (ID) of a STACKIT Project. (required) - :type project_id: str - :param create_snapshot_payload: Request a snapshot creation. (required) - :type create_snapshot_payload: CreateSnapshotPayload + :param organization_id: The identifier (ID) of a STACKIT Organization. (required) + :type organization_id: str + :param area_id: The identifier (ID) of a STACKIT Network Area. (required) + :type area_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param routing_table_id: The identifier (ID) of a STACKIT Routing Table. (required) + :type routing_table_id: str + :param route_id: The identifier (ID) of a STACKIT Route. (required) + :type route_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -5836,9 +11921,12 @@ def create_snapshot_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._create_snapshot_serialize( - project_id=project_id, - create_snapshot_payload=create_snapshot_payload, + _param = self._delete_route_from_routing_table_serialize( + organization_id=organization_id, + area_id=area_id, + region=region, + routing_table_id=routing_table_id, + route_id=route_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -5846,7 +11934,7 @@ def create_snapshot_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "201": "Snapshot", + "204": None, "400": "Error", "401": "Error", "403": "Error", @@ -5861,13 +11949,30 @@ def create_snapshot_with_http_info( ) @validate_call - def create_snapshot_without_preload_content( + def delete_route_from_routing_table_without_preload_content( self, - project_id: Annotated[ + organization_id: Annotated[ str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), + Field( + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Organization." + ), + ], + area_id: Annotated[ + str, + Field( + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Network Area." + ), + ], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + routing_table_id: Annotated[ + str, + Field( + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Routing Table." + ), + ], + route_id: Annotated[ + str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Route.") ], - create_snapshot_payload: Annotated[CreateSnapshotPayload, Field(description="Request a snapshot creation.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -5878,14 +11983,20 @@ def create_snapshot_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Create new Snapshot. + """Delete a route in a routing table. - Create a new Snapshot from a Volume in a project. + Delete a route in an existing routing table. - :param project_id: The identifier (ID) of a STACKIT Project. (required) - :type project_id: str - :param create_snapshot_payload: Request a snapshot creation. (required) - :type create_snapshot_payload: CreateSnapshotPayload + :param organization_id: The identifier (ID) of a STACKIT Organization. (required) + :type organization_id: str + :param area_id: The identifier (ID) of a STACKIT Network Area. (required) + :type area_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param routing_table_id: The identifier (ID) of a STACKIT Routing Table. (required) + :type routing_table_id: str + :param route_id: The identifier (ID) of a STACKIT Route. (required) + :type route_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -5908,9 +12019,12 @@ def create_snapshot_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._create_snapshot_serialize( - project_id=project_id, - create_snapshot_payload=create_snapshot_payload, + _param = self._delete_route_from_routing_table_serialize( + organization_id=organization_id, + area_id=area_id, + region=region, + routing_table_id=routing_table_id, + route_id=route_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -5918,7 +12032,7 @@ def create_snapshot_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "201": "Snapshot", + "204": None, "400": "Error", "401": "Error", "403": "Error", @@ -5928,10 +12042,13 @@ def create_snapshot_without_preload_content( response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _create_snapshot_serialize( + def _delete_route_from_routing_table_serialize( self, - project_id, - create_snapshot_payload, + organization_id, + area_id, + region, + routing_table_id, + route_id, _request_auth, _content_type, _headers, @@ -5950,33 +12067,31 @@ def _create_snapshot_serialize( _body_params: Optional[bytes] = None # process the path parameters - if project_id is not None: - _path_params["projectId"] = project_id + if organization_id is not None: + _path_params["organizationId"] = organization_id + if area_id is not None: + _path_params["areaId"] = area_id + if region is not None: + _path_params["region"] = region + if routing_table_id is not None: + _path_params["routingTableId"] = routing_table_id + if route_id is not None: + _path_params["routeId"] = route_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - if create_snapshot_payload is not None: - _body_params = create_snapshot_payload # set the HTTP header `Accept` if "Accept" not in _header_params: _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) - # set the HTTP header `Content-Type` - if _content_type: - _header_params["Content-Type"] = _content_type - else: - _default_content_type = self.api_client.select_header_content_type(["application/json"]) - if _default_content_type is not None: - _header_params["Content-Type"] = _default_content_type - # authentication setting _auth_settings: List[str] = [] return self.api_client.param_serialize( - method="POST", - resource_path="/v1/projects/{projectId}/snapshots", + method="DELETE", + resource_path="/v2beta1/organizations/{organizationId}/network-areas/{areaId}/regions/{region}/routing-tables/{routingTableId}/routes/{routeId}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -5990,13 +12105,27 @@ def _create_snapshot_serialize( ) @validate_call - def create_volume( + def delete_routing_table_from_area( self, - project_id: Annotated[ + organization_id: Annotated[ str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), + Field( + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Organization." + ), + ], + area_id: Annotated[ + str, + Field( + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Network Area." + ), + ], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + routing_table_id: Annotated[ + str, + Field( + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Routing Table." + ), ], - create_volume_payload: Annotated[CreateVolumePayload, Field(description="Request a volume creation.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -6006,15 +12135,111 @@ def create_volume( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> Volume: - """Create new volume. + ) -> None: + """Delete a routing table. - Create a new volume in a project. If a volume source is not provided, an empty volume will be created. The size property is required if no source or an image source is provided. + Delete a routing table of a network area. - :param project_id: The identifier (ID) of a STACKIT Project. (required) - :type project_id: str - :param create_volume_payload: Request a volume creation. (required) - :type create_volume_payload: CreateVolumePayload + :param organization_id: The identifier (ID) of a STACKIT Organization. (required) + :type organization_id: str + :param area_id: The identifier (ID) of a STACKIT Network Area. (required) + :type area_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param routing_table_id: The identifier (ID) of a STACKIT Routing Table. (required) + :type routing_table_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_routing_table_from_area_serialize( + organization_id=organization_id, + area_id=area_id, + region=region, + routing_table_id=routing_table_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "204": None, + "400": "Error", + "401": "Error", + "403": "Error", + "404": "Error", + "500": "Error", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def delete_routing_table_from_area_with_http_info( + self, + organization_id: Annotated[ + str, + Field( + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Organization." + ), + ], + area_id: Annotated[ + str, + Field( + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Network Area." + ), + ], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + routing_table_id: Annotated[ + str, + Field( + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Routing Table." + ), + ], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Delete a routing table. + + Delete a routing table of a network area. + + :param organization_id: The identifier (ID) of a STACKIT Organization. (required) + :type organization_id: str + :param area_id: The identifier (ID) of a STACKIT Network Area. (required) + :type area_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param routing_table_id: The identifier (ID) of a STACKIT Routing Table. (required) + :type routing_table_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -6037,9 +12262,11 @@ def create_volume( :return: Returns the result object. """ # noqa: E501 - _param = self._create_volume_serialize( - project_id=project_id, - create_volume_payload=create_volume_payload, + _param = self._delete_routing_table_from_area_serialize( + organization_id=organization_id, + area_id=area_id, + region=region, + routing_table_id=routing_table_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -6047,7 +12274,7 @@ def create_volume( ) _response_types_map: Dict[str, Optional[str]] = { - "201": "Volume", + "204": None, "400": "Error", "401": "Error", "403": "Error", @@ -6059,88 +12286,30 @@ def create_volume( return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, - ).data + ) @validate_call - def create_volume_with_http_info( + def delete_routing_table_from_area_without_preload_content( self, - project_id: Annotated[ + organization_id: Annotated[ str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), + Field( + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Organization." + ), ], - create_volume_payload: Annotated[CreateVolumePayload, Field(description="Request a volume creation.")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[Volume]: - """Create new volume. - - Create a new volume in a project. If a volume source is not provided, an empty volume will be created. The size property is required if no source or an image source is provided. - - :param project_id: The identifier (ID) of a STACKIT Project. (required) - :type project_id: str - :param create_volume_payload: Request a volume creation. (required) - :type create_volume_payload: CreateVolumePayload - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._create_volume_serialize( - project_id=project_id, - create_volume_payload=create_volume_payload, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index, - ) - - _response_types_map: Dict[str, Optional[str]] = { - "201": "Volume", - "400": "Error", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - } - response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - @validate_call - def create_volume_without_preload_content( - self, - project_id: Annotated[ + area_id: Annotated[ str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), + Field( + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Network Area." + ), + ], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + routing_table_id: Annotated[ + str, + Field( + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Routing Table." + ), ], - create_volume_payload: Annotated[CreateVolumePayload, Field(description="Request a volume creation.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -6151,14 +12320,18 @@ def create_volume_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Create new volume. + """Delete a routing table. - Create a new volume in a project. If a volume source is not provided, an empty volume will be created. The size property is required if no source or an image source is provided. + Delete a routing table of a network area. - :param project_id: The identifier (ID) of a STACKIT Project. (required) - :type project_id: str - :param create_volume_payload: Request a volume creation. (required) - :type create_volume_payload: CreateVolumePayload + :param organization_id: The identifier (ID) of a STACKIT Organization. (required) + :type organization_id: str + :param area_id: The identifier (ID) of a STACKIT Network Area. (required) + :type area_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param routing_table_id: The identifier (ID) of a STACKIT Routing Table. (required) + :type routing_table_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -6181,9 +12354,11 @@ def create_volume_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._create_volume_serialize( - project_id=project_id, - create_volume_payload=create_volume_payload, + _param = self._delete_routing_table_from_area_serialize( + organization_id=organization_id, + area_id=area_id, + region=region, + routing_table_id=routing_table_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -6191,7 +12366,7 @@ def create_volume_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "201": "Volume", + "204": None, "400": "Error", "401": "Error", "403": "Error", @@ -6201,10 +12376,12 @@ def create_volume_without_preload_content( response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _create_volume_serialize( + def _delete_routing_table_from_area_serialize( self, - project_id, - create_volume_payload, + organization_id, + area_id, + region, + routing_table_id, _request_auth, _content_type, _headers, @@ -6223,33 +12400,29 @@ def _create_volume_serialize( _body_params: Optional[bytes] = None # process the path parameters - if project_id is not None: - _path_params["projectId"] = project_id + if organization_id is not None: + _path_params["organizationId"] = organization_id + if area_id is not None: + _path_params["areaId"] = area_id + if region is not None: + _path_params["region"] = region + if routing_table_id is not None: + _path_params["routingTableId"] = routing_table_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - if create_volume_payload is not None: - _body_params = create_volume_payload # set the HTTP header `Accept` if "Accept" not in _header_params: _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) - # set the HTTP header `Content-Type` - if _content_type: - _header_params["Content-Type"] = _content_type - else: - _default_content_type = self.api_client.select_header_content_type(["application/json"]) - if _default_content_type is not None: - _header_params["Content-Type"] = _default_content_type - # authentication setting _auth_settings: List[str] = [] return self.api_client.param_serialize( - method="POST", - resource_path="/v1/projects/{projectId}/volumes", + method="DELETE", + resource_path="/v2beta1/organizations/{organizationId}/network-areas/{areaId}/regions/{region}/routing-tables/{routingTableId}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -6263,15 +12436,21 @@ def _create_volume_serialize( ) @validate_call - def deallocate_server( + def delete_security_group( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - server_id: Annotated[ + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + security_group_id: Annotated[ str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Server."), + Field( + min_length=36, + strict=True, + max_length=36, + description="The identifier (ID) of a STACKIT Security Group.", + ), ], _request_timeout: Union[ None, @@ -6283,14 +12462,16 @@ def deallocate_server( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> None: - """Deallocate an existing server. + """Delete security group. - Deallocate an existing server. The server will be removed from the hypervisor so only the volume will be billed. + Delete a security group. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str - :param server_id: The identifier (ID) of a STACKIT Server. (required) - :type server_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param security_group_id: The identifier (ID) of a STACKIT Security Group. (required) + :type security_group_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -6313,9 +12494,10 @@ def deallocate_server( :return: Returns the result object. """ # noqa: E501 - _param = self._deallocate_server_serialize( + _param = self._delete_security_group_serialize( project_id=project_id, - server_id=server_id, + region=region, + security_group_id=security_group_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -6323,7 +12505,7 @@ def deallocate_server( ) _response_types_map: Dict[str, Optional[str]] = { - "202": None, + "204": None, "400": "Error", "401": "Error", "403": "Error", @@ -6339,15 +12521,21 @@ def deallocate_server( ).data @validate_call - def deallocate_server_with_http_info( + def delete_security_group_with_http_info( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - server_id: Annotated[ + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + security_group_id: Annotated[ str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Server."), + Field( + min_length=36, + strict=True, + max_length=36, + description="The identifier (ID) of a STACKIT Security Group.", + ), ], _request_timeout: Union[ None, @@ -6359,14 +12547,16 @@ def deallocate_server_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[None]: - """Deallocate an existing server. + """Delete security group. - Deallocate an existing server. The server will be removed from the hypervisor so only the volume will be billed. + Delete a security group. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str - :param server_id: The identifier (ID) of a STACKIT Server. (required) - :type server_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param security_group_id: The identifier (ID) of a STACKIT Security Group. (required) + :type security_group_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -6389,9 +12579,10 @@ def deallocate_server_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._deallocate_server_serialize( + _param = self._delete_security_group_serialize( project_id=project_id, - server_id=server_id, + region=region, + security_group_id=security_group_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -6399,7 +12590,7 @@ def deallocate_server_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "202": None, + "204": None, "400": "Error", "401": "Error", "403": "Error", @@ -6415,15 +12606,21 @@ def deallocate_server_with_http_info( ) @validate_call - def deallocate_server_without_preload_content( + def delete_security_group_without_preload_content( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - server_id: Annotated[ + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + security_group_id: Annotated[ str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Server."), + Field( + min_length=36, + strict=True, + max_length=36, + description="The identifier (ID) of a STACKIT Security Group.", + ), ], _request_timeout: Union[ None, @@ -6435,14 +12632,16 @@ def deallocate_server_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Deallocate an existing server. + """Delete security group. - Deallocate an existing server. The server will be removed from the hypervisor so only the volume will be billed. + Delete a security group. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str - :param server_id: The identifier (ID) of a STACKIT Server. (required) - :type server_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param security_group_id: The identifier (ID) of a STACKIT Security Group. (required) + :type security_group_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -6465,9 +12664,10 @@ def deallocate_server_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._deallocate_server_serialize( + _param = self._delete_security_group_serialize( project_id=project_id, - server_id=server_id, + region=region, + security_group_id=security_group_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -6475,7 +12675,7 @@ def deallocate_server_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "202": None, + "204": None, "400": "Error", "401": "Error", "403": "Error", @@ -6486,10 +12686,11 @@ def deallocate_server_without_preload_content( response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _deallocate_server_serialize( + def _delete_security_group_serialize( self, project_id, - server_id, + region, + security_group_id, _request_auth, _content_type, _headers, @@ -6510,8 +12711,10 @@ def _deallocate_server_serialize( # process the path parameters if project_id is not None: _path_params["projectId"] = project_id - if server_id is not None: - _path_params["serverId"] = server_id + if region is not None: + _path_params["region"] = region + if security_group_id is not None: + _path_params["securityGroupId"] = security_group_id # process the query parameters # process the header parameters # process the form parameters @@ -6525,8 +12728,8 @@ def _deallocate_server_serialize( _auth_settings: List[str] = [] return self.api_client.param_serialize( - method="POST", - resource_path="/v1/projects/{projectId}/servers/{serverId}/deallocate", + method="DELETE", + resource_path="/v2beta1/projects/{projectId}/regions/{region}/security-groups/{securityGroupId}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -6540,19 +12743,29 @@ def _deallocate_server_serialize( ) @validate_call - def delete_affinity_group( + def delete_security_group_rule( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - affinity_group_id: Annotated[ + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + security_group_id: Annotated[ str, Field( min_length=36, strict=True, max_length=36, - description="The identifier (ID) of a STACKIT Affinity Group.", + description="The identifier (ID) of a STACKIT Security Group.", + ), + ], + security_group_rule_id: Annotated[ + str, + Field( + min_length=36, + strict=True, + max_length=36, + description="The identifier (ID) of a STACKIT Security Group Rule.", ), ], _request_timeout: Union[ @@ -6565,14 +12778,18 @@ def delete_affinity_group( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> None: - """Delete a affinity group in a project. + """Delete security group rule. - Delete a affinity group in the given project. + Delete a security group rule. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str - :param affinity_group_id: The identifier (ID) of a STACKIT Affinity Group. (required) - :type affinity_group_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param security_group_id: The identifier (ID) of a STACKIT Security Group. (required) + :type security_group_id: str + :param security_group_rule_id: The identifier (ID) of a STACKIT Security Group Rule. (required) + :type security_group_rule_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -6595,9 +12812,11 @@ def delete_affinity_group( :return: Returns the result object. """ # noqa: E501 - _param = self._delete_affinity_group_serialize( + _param = self._delete_security_group_rule_serialize( project_id=project_id, - affinity_group_id=affinity_group_id, + region=region, + security_group_id=security_group_id, + security_group_rule_id=security_group_rule_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -6620,19 +12839,29 @@ def delete_affinity_group( ).data @validate_call - def delete_affinity_group_with_http_info( + def delete_security_group_rule_with_http_info( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - affinity_group_id: Annotated[ + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + security_group_id: Annotated[ str, Field( min_length=36, strict=True, max_length=36, - description="The identifier (ID) of a STACKIT Affinity Group.", + description="The identifier (ID) of a STACKIT Security Group.", + ), + ], + security_group_rule_id: Annotated[ + str, + Field( + min_length=36, + strict=True, + max_length=36, + description="The identifier (ID) of a STACKIT Security Group Rule.", ), ], _request_timeout: Union[ @@ -6645,14 +12874,18 @@ def delete_affinity_group_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[None]: - """Delete a affinity group in a project. + """Delete security group rule. - Delete a affinity group in the given project. + Delete a security group rule. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str - :param affinity_group_id: The identifier (ID) of a STACKIT Affinity Group. (required) - :type affinity_group_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param security_group_id: The identifier (ID) of a STACKIT Security Group. (required) + :type security_group_id: str + :param security_group_rule_id: The identifier (ID) of a STACKIT Security Group Rule. (required) + :type security_group_rule_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -6675,9 +12908,11 @@ def delete_affinity_group_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._delete_affinity_group_serialize( + _param = self._delete_security_group_rule_serialize( project_id=project_id, - affinity_group_id=affinity_group_id, + region=region, + security_group_id=security_group_id, + security_group_rule_id=security_group_rule_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -6700,19 +12935,29 @@ def delete_affinity_group_with_http_info( ) @validate_call - def delete_affinity_group_without_preload_content( + def delete_security_group_rule_without_preload_content( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - affinity_group_id: Annotated[ + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + security_group_id: Annotated[ str, Field( min_length=36, strict=True, max_length=36, - description="The identifier (ID) of a STACKIT Affinity Group.", + description="The identifier (ID) of a STACKIT Security Group.", + ), + ], + security_group_rule_id: Annotated[ + str, + Field( + min_length=36, + strict=True, + max_length=36, + description="The identifier (ID) of a STACKIT Security Group Rule.", ), ], _request_timeout: Union[ @@ -6725,14 +12970,18 @@ def delete_affinity_group_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Delete a affinity group in a project. + """Delete security group rule. - Delete a affinity group in the given project. + Delete a security group rule. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str - :param affinity_group_id: The identifier (ID) of a STACKIT Affinity Group. (required) - :type affinity_group_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param security_group_id: The identifier (ID) of a STACKIT Security Group. (required) + :type security_group_id: str + :param security_group_rule_id: The identifier (ID) of a STACKIT Security Group Rule. (required) + :type security_group_rule_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -6755,9 +13004,11 @@ def delete_affinity_group_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._delete_affinity_group_serialize( + _param = self._delete_security_group_rule_serialize( project_id=project_id, - affinity_group_id=affinity_group_id, + region=region, + security_group_id=security_group_id, + security_group_rule_id=security_group_rule_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -6775,10 +13026,12 @@ def delete_affinity_group_without_preload_content( response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _delete_affinity_group_serialize( + def _delete_security_group_rule_serialize( self, project_id, - affinity_group_id, + region, + security_group_id, + security_group_rule_id, _request_auth, _content_type, _headers, @@ -6799,8 +13052,12 @@ def _delete_affinity_group_serialize( # process the path parameters if project_id is not None: _path_params["projectId"] = project_id - if affinity_group_id is not None: - _path_params["affinityGroupId"] = affinity_group_id + if region is not None: + _path_params["region"] = region + if security_group_id is not None: + _path_params["securityGroupId"] = security_group_id + if security_group_rule_id is not None: + _path_params["securityGroupRuleId"] = security_group_rule_id # process the query parameters # process the header parameters # process the form parameters @@ -6815,7 +13072,7 @@ def _delete_affinity_group_serialize( return self.api_client.param_serialize( method="DELETE", - resource_path="/v1/projects/{projectId}/affinity-groups/{affinityGroupId}", + resource_path="/v2beta1/projects/{projectId}/regions/{region}/security-groups/{securityGroupId}/rules/{securityGroupRuleId}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -6829,17 +13086,17 @@ def _delete_affinity_group_serialize( ) @validate_call - def delete_backup( + def delete_server( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - backup_id: Annotated[ + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + server_id: Annotated[ str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Backup."), + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Server."), ], - force: Annotated[Optional[StrictBool], Field(description="Force action.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -6850,16 +13107,16 @@ def delete_backup( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> None: - """Delete a backup. + """Delete a server. - Delete a backup that is part of the project. + Delete a server. Volumes won't be deleted. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str - :param backup_id: The identifier (ID) of a STACKIT Backup. (required) - :type backup_id: str - :param force: Force action. - :type force: bool + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param server_id: The identifier (ID) of a STACKIT Server. (required) + :type server_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -6882,10 +13139,10 @@ def delete_backup( :return: Returns the result object. """ # noqa: E501 - _param = self._delete_backup_serialize( + _param = self._delete_server_serialize( project_id=project_id, - backup_id=backup_id, - force=force, + region=region, + server_id=server_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -6908,17 +13165,17 @@ def delete_backup( ).data @validate_call - def delete_backup_with_http_info( + def delete_server_with_http_info( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - backup_id: Annotated[ + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + server_id: Annotated[ str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Backup."), + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Server."), ], - force: Annotated[Optional[StrictBool], Field(description="Force action.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -6929,16 +13186,16 @@ def delete_backup_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[None]: - """Delete a backup. + """Delete a server. - Delete a backup that is part of the project. + Delete a server. Volumes won't be deleted. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str - :param backup_id: The identifier (ID) of a STACKIT Backup. (required) - :type backup_id: str - :param force: Force action. - :type force: bool + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param server_id: The identifier (ID) of a STACKIT Server. (required) + :type server_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -6961,10 +13218,10 @@ def delete_backup_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._delete_backup_serialize( + _param = self._delete_server_serialize( project_id=project_id, - backup_id=backup_id, - force=force, + region=region, + server_id=server_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -6987,17 +13244,17 @@ def delete_backup_with_http_info( ) @validate_call - def delete_backup_without_preload_content( + def delete_server_without_preload_content( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - backup_id: Annotated[ + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + server_id: Annotated[ str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Backup."), + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Server."), ], - force: Annotated[Optional[StrictBool], Field(description="Force action.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -7008,16 +13265,16 @@ def delete_backup_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Delete a backup. + """Delete a server. - Delete a backup that is part of the project. + Delete a server. Volumes won't be deleted. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str - :param backup_id: The identifier (ID) of a STACKIT Backup. (required) - :type backup_id: str - :param force: Force action. - :type force: bool + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param server_id: The identifier (ID) of a STACKIT Server. (required) + :type server_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -7040,10 +13297,10 @@ def delete_backup_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._delete_backup_serialize( + _param = self._delete_server_serialize( project_id=project_id, - backup_id=backup_id, - force=force, + region=region, + server_id=server_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -7061,11 +13318,11 @@ def delete_backup_without_preload_content( response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _delete_backup_serialize( + def _delete_server_serialize( self, project_id, - backup_id, - force, + region, + server_id, _request_auth, _content_type, _headers, @@ -7086,13 +13343,11 @@ def _delete_backup_serialize( # process the path parameters if project_id is not None: _path_params["projectId"] = project_id - if backup_id is not None: - _path_params["backupId"] = backup_id + if region is not None: + _path_params["region"] = region + if server_id is not None: + _path_params["serverId"] = server_id # process the query parameters - if force is not None: - - _query_params.append(("force", force)) - # process the header parameters # process the form parameters # process the body parameter @@ -7106,7 +13361,7 @@ def _delete_backup_serialize( return self.api_client.param_serialize( method="DELETE", - resource_path="/v1/projects/{projectId}/backups/{backupId}", + resource_path="/v2beta1/projects/{projectId}/regions/{region}/servers/{serverId}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -7120,14 +13375,16 @@ def _delete_backup_serialize( ) @validate_call - def delete_image( + def delete_volume( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - image_id: Annotated[ - str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Image.") + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + volume_id: Annotated[ + str, + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Volume."), ], _request_timeout: Union[ None, @@ -7139,14 +13396,16 @@ def delete_image( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> None: - """Delete an Image. + """Delete a volume. - Delete an image that is part of the project. + Delete a volume inside a project. The deletion will fail if the volume is still in use. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str - :param image_id: The identifier (ID) of a STACKIT Image. (required) - :type image_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param volume_id: The identifier (ID) of a STACKIT Volume. (required) + :type volume_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -7169,9 +13428,10 @@ def delete_image( :return: Returns the result object. """ # noqa: E501 - _param = self._delete_image_serialize( + _param = self._delete_volume_serialize( project_id=project_id, - image_id=image_id, + region=region, + volume_id=volume_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -7184,6 +13444,7 @@ def delete_image( "401": "Error", "403": "Error", "404": "Error", + "409": "Error", "500": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -7194,14 +13455,16 @@ def delete_image( ).data @validate_call - def delete_image_with_http_info( + def delete_volume_with_http_info( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - image_id: Annotated[ - str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Image.") + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + volume_id: Annotated[ + str, + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Volume."), ], _request_timeout: Union[ None, @@ -7213,14 +13476,16 @@ def delete_image_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[None]: - """Delete an Image. + """Delete a volume. - Delete an image that is part of the project. + Delete a volume inside a project. The deletion will fail if the volume is still in use. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str - :param image_id: The identifier (ID) of a STACKIT Image. (required) - :type image_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param volume_id: The identifier (ID) of a STACKIT Volume. (required) + :type volume_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -7243,9 +13508,10 @@ def delete_image_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._delete_image_serialize( + _param = self._delete_volume_serialize( project_id=project_id, - image_id=image_id, + region=region, + volume_id=volume_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -7258,6 +13524,7 @@ def delete_image_with_http_info( "401": "Error", "403": "Error", "404": "Error", + "409": "Error", "500": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -7268,14 +13535,16 @@ def delete_image_with_http_info( ) @validate_call - def delete_image_without_preload_content( + def delete_volume_without_preload_content( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - image_id: Annotated[ - str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Image.") + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + volume_id: Annotated[ + str, + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Volume."), ], _request_timeout: Union[ None, @@ -7287,14 +13556,16 @@ def delete_image_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Delete an Image. + """Delete a volume. - Delete an image that is part of the project. + Delete a volume inside a project. The deletion will fail if the volume is still in use. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str - :param image_id: The identifier (ID) of a STACKIT Image. (required) - :type image_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param volume_id: The identifier (ID) of a STACKIT Volume. (required) + :type volume_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -7317,9 +13588,10 @@ def delete_image_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._delete_image_serialize( + _param = self._delete_volume_serialize( project_id=project_id, - image_id=image_id, + region=region, + volume_id=volume_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -7332,15 +13604,17 @@ def delete_image_without_preload_content( "401": "Error", "403": "Error", "404": "Error", + "409": "Error", "500": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _delete_image_serialize( + def _delete_volume_serialize( self, project_id, - image_id, + region, + volume_id, _request_auth, _content_type, _headers, @@ -7361,8 +13635,10 @@ def _delete_image_serialize( # process the path parameters if project_id is not None: _path_params["projectId"] = project_id - if image_id is not None: - _path_params["imageId"] = image_id + if region is not None: + _path_params["region"] = region + if volume_id is not None: + _path_params["volumeId"] = volume_id # process the query parameters # process the header parameters # process the form parameters @@ -7377,7 +13653,7 @@ def _delete_image_serialize( return self.api_client.param_serialize( method="DELETE", - resource_path="/v1/projects/{projectId}/images/{imageId}", + resource_path="/v2beta1/projects/{projectId}/regions/{region}/volumes/{volumeId}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -7391,14 +13667,21 @@ def _delete_image_serialize( ) @validate_call - def delete_image_share( + def get_affinity_group( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - image_id: Annotated[ - str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Image.") + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + affinity_group_id: Annotated[ + str, + Field( + min_length=36, + strict=True, + max_length=36, + description="The identifier (ID) of a STACKIT Affinity Group.", + ), ], _request_timeout: Union[ None, @@ -7409,15 +13692,17 @@ def delete_image_share( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> None: - """Remove image share. + ) -> AffinityGroup: + """Get the affinity group. - Remove the image share. New scope will be local. + Get the affinity group created in a project. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str - :param image_id: The identifier (ID) of a STACKIT Image. (required) - :type image_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param affinity_group_id: The identifier (ID) of a STACKIT Affinity Group. (required) + :type affinity_group_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -7440,9 +13725,10 @@ def delete_image_share( :return: Returns the result object. """ # noqa: E501 - _param = self._delete_image_share_serialize( + _param = self._get_affinity_group_serialize( project_id=project_id, - image_id=image_id, + region=region, + affinity_group_id=affinity_group_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -7450,7 +13736,7 @@ def delete_image_share( ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, + "200": "AffinityGroup", "400": "Error", "401": "Error", "403": "Error", @@ -7465,14 +13751,21 @@ def delete_image_share( ).data @validate_call - def delete_image_share_with_http_info( + def get_affinity_group_with_http_info( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - image_id: Annotated[ - str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Image.") + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + affinity_group_id: Annotated[ + str, + Field( + min_length=36, + strict=True, + max_length=36, + description="The identifier (ID) of a STACKIT Affinity Group.", + ), ], _request_timeout: Union[ None, @@ -7483,15 +13776,17 @@ def delete_image_share_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[None]: - """Remove image share. + ) -> ApiResponse[AffinityGroup]: + """Get the affinity group. - Remove the image share. New scope will be local. + Get the affinity group created in a project. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str - :param image_id: The identifier (ID) of a STACKIT Image. (required) - :type image_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param affinity_group_id: The identifier (ID) of a STACKIT Affinity Group. (required) + :type affinity_group_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -7514,9 +13809,10 @@ def delete_image_share_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._delete_image_share_serialize( + _param = self._get_affinity_group_serialize( project_id=project_id, - image_id=image_id, + region=region, + affinity_group_id=affinity_group_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -7524,7 +13820,7 @@ def delete_image_share_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, + "200": "AffinityGroup", "400": "Error", "401": "Error", "403": "Error", @@ -7539,14 +13835,21 @@ def delete_image_share_with_http_info( ) @validate_call - def delete_image_share_without_preload_content( + def get_affinity_group_without_preload_content( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - image_id: Annotated[ - str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Image.") + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + affinity_group_id: Annotated[ + str, + Field( + min_length=36, + strict=True, + max_length=36, + description="The identifier (ID) of a STACKIT Affinity Group.", + ), ], _request_timeout: Union[ None, @@ -7558,14 +13861,16 @@ def delete_image_share_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Remove image share. + """Get the affinity group. - Remove the image share. New scope will be local. + Get the affinity group created in a project. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str - :param image_id: The identifier (ID) of a STACKIT Image. (required) - :type image_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param affinity_group_id: The identifier (ID) of a STACKIT Affinity Group. (required) + :type affinity_group_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -7588,9 +13893,10 @@ def delete_image_share_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._delete_image_share_serialize( + _param = self._get_affinity_group_serialize( project_id=project_id, - image_id=image_id, + region=region, + affinity_group_id=affinity_group_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -7598,7 +13904,7 @@ def delete_image_share_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, + "200": "AffinityGroup", "400": "Error", "401": "Error", "403": "Error", @@ -7608,10 +13914,11 @@ def delete_image_share_without_preload_content( response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _delete_image_share_serialize( + def _get_affinity_group_serialize( self, project_id, - image_id, + region, + affinity_group_id, _request_auth, _content_type, _headers, @@ -7632,8 +13939,10 @@ def _delete_image_share_serialize( # process the path parameters if project_id is not None: _path_params["projectId"] = project_id - if image_id is not None: - _path_params["imageId"] = image_id + if region is not None: + _path_params["region"] = region + if affinity_group_id is not None: + _path_params["affinityGroupId"] = affinity_group_id # process the query parameters # process the header parameters # process the form parameters @@ -7647,8 +13956,8 @@ def _delete_image_share_serialize( _auth_settings: List[str] = [] return self.api_client.param_serialize( - method="DELETE", - resource_path="/v1/projects/{projectId}/images/{imageId}/share", + method="GET", + resource_path="/v2beta1/projects/{projectId}/regions/{region}/affinity-groups/{affinityGroupId}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -7662,23 +13971,20 @@ def _delete_image_share_serialize( ) @validate_call - def delete_image_share_consumer( + def get_attached_volume( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - image_id: Annotated[ - str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Image.") + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + server_id: Annotated[ + str, + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Server."), ], - consumer_project_id: Annotated[ + volume_id: Annotated[ str, - Field( - min_length=36, - strict=True, - max_length=36, - description="The identifier (ID) of a STACKIT Project that consumes an image share.", - ), + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Volume."), ], _request_timeout: Union[ None, @@ -7689,17 +13995,19 @@ def delete_image_share_consumer( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> None: - """Remove an image share consumer. + ) -> VolumeAttachment: + """Get Volume Attachment details. - Remove consumer from a shared image. + Get the details of an existing Volume Attachment. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str - :param image_id: The identifier (ID) of a STACKIT Image. (required) - :type image_id: str - :param consumer_project_id: The identifier (ID) of a STACKIT Project that consumes an image share. (required) - :type consumer_project_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param server_id: The identifier (ID) of a STACKIT Server. (required) + :type server_id: str + :param volume_id: The identifier (ID) of a STACKIT Volume. (required) + :type volume_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -7722,10 +14030,11 @@ def delete_image_share_consumer( :return: Returns the result object. """ # noqa: E501 - _param = self._delete_image_share_consumer_serialize( + _param = self._get_attached_volume_serialize( project_id=project_id, - image_id=image_id, - consumer_project_id=consumer_project_id, + region=region, + server_id=server_id, + volume_id=volume_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -7733,7 +14042,7 @@ def delete_image_share_consumer( ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, + "200": "VolumeAttachment", "400": "Error", "401": "Error", "403": "Error", @@ -7748,23 +14057,20 @@ def delete_image_share_consumer( ).data @validate_call - def delete_image_share_consumer_with_http_info( + def get_attached_volume_with_http_info( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - image_id: Annotated[ - str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Image.") + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + server_id: Annotated[ + str, + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Server."), ], - consumer_project_id: Annotated[ + volume_id: Annotated[ str, - Field( - min_length=36, - strict=True, - max_length=36, - description="The identifier (ID) of a STACKIT Project that consumes an image share.", - ), + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Volume."), ], _request_timeout: Union[ None, @@ -7775,17 +14081,19 @@ def delete_image_share_consumer_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[None]: - """Remove an image share consumer. + ) -> ApiResponse[VolumeAttachment]: + """Get Volume Attachment details. - Remove consumer from a shared image. + Get the details of an existing Volume Attachment. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str - :param image_id: The identifier (ID) of a STACKIT Image. (required) - :type image_id: str - :param consumer_project_id: The identifier (ID) of a STACKIT Project that consumes an image share. (required) - :type consumer_project_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param server_id: The identifier (ID) of a STACKIT Server. (required) + :type server_id: str + :param volume_id: The identifier (ID) of a STACKIT Volume. (required) + :type volume_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -7808,10 +14116,11 @@ def delete_image_share_consumer_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._delete_image_share_consumer_serialize( + _param = self._get_attached_volume_serialize( project_id=project_id, - image_id=image_id, - consumer_project_id=consumer_project_id, + region=region, + server_id=server_id, + volume_id=volume_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -7819,7 +14128,7 @@ def delete_image_share_consumer_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, + "200": "VolumeAttachment", "400": "Error", "401": "Error", "403": "Error", @@ -7834,23 +14143,20 @@ def delete_image_share_consumer_with_http_info( ) @validate_call - def delete_image_share_consumer_without_preload_content( + def get_attached_volume_without_preload_content( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - image_id: Annotated[ - str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Image.") + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + server_id: Annotated[ + str, + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Server."), ], - consumer_project_id: Annotated[ + volume_id: Annotated[ str, - Field( - min_length=36, - strict=True, - max_length=36, - description="The identifier (ID) of a STACKIT Project that consumes an image share.", - ), + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Volume."), ], _request_timeout: Union[ None, @@ -7862,16 +14168,18 @@ def delete_image_share_consumer_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Remove an image share consumer. + """Get Volume Attachment details. - Remove consumer from a shared image. + Get the details of an existing Volume Attachment. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str - :param image_id: The identifier (ID) of a STACKIT Image. (required) - :type image_id: str - :param consumer_project_id: The identifier (ID) of a STACKIT Project that consumes an image share. (required) - :type consumer_project_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param server_id: The identifier (ID) of a STACKIT Server. (required) + :type server_id: str + :param volume_id: The identifier (ID) of a STACKIT Volume. (required) + :type volume_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -7894,10 +14202,11 @@ def delete_image_share_consumer_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._delete_image_share_consumer_serialize( + _param = self._get_attached_volume_serialize( project_id=project_id, - image_id=image_id, - consumer_project_id=consumer_project_id, + region=region, + server_id=server_id, + volume_id=volume_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -7905,7 +14214,7 @@ def delete_image_share_consumer_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, + "200": "VolumeAttachment", "400": "Error", "401": "Error", "403": "Error", @@ -7915,11 +14224,12 @@ def delete_image_share_consumer_without_preload_content( response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _delete_image_share_consumer_serialize( + def _get_attached_volume_serialize( self, project_id, - image_id, - consumer_project_id, + region, + server_id, + volume_id, _request_auth, _content_type, _headers, @@ -7940,10 +14250,12 @@ def _delete_image_share_consumer_serialize( # process the path parameters if project_id is not None: _path_params["projectId"] = project_id - if image_id is not None: - _path_params["imageId"] = image_id - if consumer_project_id is not None: - _path_params["consumerProjectId"] = consumer_project_id + if region is not None: + _path_params["region"] = region + if server_id is not None: + _path_params["serverId"] = server_id + if volume_id is not None: + _path_params["volumeId"] = volume_id # process the query parameters # process the header parameters # process the form parameters @@ -7957,8 +14269,8 @@ def _delete_image_share_consumer_serialize( _auth_settings: List[str] = [] return self.api_client.param_serialize( - method="DELETE", - resource_path="/v1/projects/{projectId}/images/{imageId}/share/{consumerProjectId}", + method="GET", + resource_path="/v2beta1/projects/{projectId}/regions/{region}/servers/{serverId}/volume-attachments/{volumeId}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -7972,9 +14284,17 @@ def _delete_image_share_consumer_serialize( ) @validate_call - def delete_key_pair( + def get_backup( self, - keypair_name: Annotated[str, Field(strict=True, max_length=127, description="The name of an SSH keypair.")], + project_id: Annotated[ + str, + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), + ], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + backup_id: Annotated[ + str, + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Backup."), + ], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -7984,13 +14304,17 @@ def delete_key_pair( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> None: - """Delete an SSH keypair. + ) -> Backup: + """Get details about a backup. - Delete an SSH keypair from a user. + Get details about a block device backup. - :param keypair_name: The name of an SSH keypair. (required) - :type keypair_name: str + :param project_id: The identifier (ID) of a STACKIT Project. (required) + :type project_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param backup_id: The identifier (ID) of a STACKIT Backup. (required) + :type backup_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -8013,8 +14337,10 @@ def delete_key_pair( :return: Returns the result object. """ # noqa: E501 - _param = self._delete_key_pair_serialize( - keypair_name=keypair_name, + _param = self._get_backup_serialize( + project_id=project_id, + region=region, + backup_id=backup_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -8022,7 +14348,7 @@ def delete_key_pair( ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, + "200": "Backup", "400": "Error", "401": "Error", "403": "Error", @@ -8037,9 +14363,17 @@ def delete_key_pair( ).data @validate_call - def delete_key_pair_with_http_info( + def get_backup_with_http_info( self, - keypair_name: Annotated[str, Field(strict=True, max_length=127, description="The name of an SSH keypair.")], + project_id: Annotated[ + str, + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), + ], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + backup_id: Annotated[ + str, + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Backup."), + ], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -8049,13 +14383,17 @@ def delete_key_pair_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[None]: - """Delete an SSH keypair. + ) -> ApiResponse[Backup]: + """Get details about a backup. - Delete an SSH keypair from a user. + Get details about a block device backup. - :param keypair_name: The name of an SSH keypair. (required) - :type keypair_name: str + :param project_id: The identifier (ID) of a STACKIT Project. (required) + :type project_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param backup_id: The identifier (ID) of a STACKIT Backup. (required) + :type backup_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -8078,8 +14416,10 @@ def delete_key_pair_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._delete_key_pair_serialize( - keypair_name=keypair_name, + _param = self._get_backup_serialize( + project_id=project_id, + region=region, + backup_id=backup_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -8087,7 +14427,7 @@ def delete_key_pair_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, + "200": "Backup", "400": "Error", "401": "Error", "403": "Error", @@ -8102,9 +14442,17 @@ def delete_key_pair_with_http_info( ) @validate_call - def delete_key_pair_without_preload_content( + def get_backup_without_preload_content( self, - keypair_name: Annotated[str, Field(strict=True, max_length=127, description="The name of an SSH keypair.")], + project_id: Annotated[ + str, + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), + ], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + backup_id: Annotated[ + str, + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Backup."), + ], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -8115,12 +14463,16 @@ def delete_key_pair_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Delete an SSH keypair. + """Get details about a backup. - Delete an SSH keypair from a user. + Get details about a block device backup. - :param keypair_name: The name of an SSH keypair. (required) - :type keypair_name: str + :param project_id: The identifier (ID) of a STACKIT Project. (required) + :type project_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param backup_id: The identifier (ID) of a STACKIT Backup. (required) + :type backup_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -8143,8 +14495,10 @@ def delete_key_pair_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._delete_key_pair_serialize( - keypair_name=keypair_name, + _param = self._get_backup_serialize( + project_id=project_id, + region=region, + backup_id=backup_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -8152,7 +14506,7 @@ def delete_key_pair_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, + "200": "Backup", "400": "Error", "401": "Error", "403": "Error", @@ -8162,9 +14516,11 @@ def delete_key_pair_without_preload_content( response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _delete_key_pair_serialize( + def _get_backup_serialize( self, - keypair_name, + project_id, + region, + backup_id, _request_auth, _content_type, _headers, @@ -8183,8 +14539,12 @@ def _delete_key_pair_serialize( _body_params: Optional[bytes] = None # process the path parameters - if keypair_name is not None: - _path_params["keypairName"] = keypair_name + if project_id is not None: + _path_params["projectId"] = project_id + if region is not None: + _path_params["region"] = region + if backup_id is not None: + _path_params["backupId"] = backup_id # process the query parameters # process the header parameters # process the form parameters @@ -8198,8 +14558,8 @@ def _delete_key_pair_serialize( _auth_settings: List[str] = [] return self.api_client.param_serialize( - method="DELETE", - resource_path="/v1/keypairs/{keypairName}", + method="GET", + resource_path="/v2beta1/projects/{projectId}/regions/{region}/backups/{backupId}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -8213,15 +14573,15 @@ def _delete_key_pair_serialize( ) @validate_call - def delete_network( + def get_image( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - network_id: Annotated[ - str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Network."), + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + image_id: Annotated[ + str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Image.") ], _request_timeout: Union[ None, @@ -8232,15 +14592,17 @@ def delete_network( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> None: - """Delete network. + ) -> Image: + """Get details about an image. - Delete a network. If the network is still in use, the deletion will fail. + Get details about a specific Image inside a project. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str - :param network_id: The identifier (ID) of a STACKIT Network. (required) - :type network_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param image_id: The identifier (ID) of a STACKIT Image. (required) + :type image_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -8263,9 +14625,10 @@ def delete_network( :return: Returns the result object. """ # noqa: E501 - _param = self._delete_network_serialize( + _param = self._get_image_serialize( project_id=project_id, - network_id=network_id, + region=region, + image_id=image_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -8273,12 +14636,11 @@ def delete_network( ) _response_types_map: Dict[str, Optional[str]] = { - "202": None, + "200": "Image", "400": "Error", "401": "Error", "403": "Error", "404": "Error", - "409": "Error", "500": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -8289,15 +14651,15 @@ def delete_network( ).data @validate_call - def delete_network_with_http_info( + def get_image_with_http_info( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - network_id: Annotated[ - str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Network."), + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + image_id: Annotated[ + str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Image.") ], _request_timeout: Union[ None, @@ -8308,15 +14670,17 @@ def delete_network_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[None]: - """Delete network. + ) -> ApiResponse[Image]: + """Get details about an image. - Delete a network. If the network is still in use, the deletion will fail. + Get details about a specific Image inside a project. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str - :param network_id: The identifier (ID) of a STACKIT Network. (required) - :type network_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param image_id: The identifier (ID) of a STACKIT Image. (required) + :type image_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -8339,9 +14703,10 @@ def delete_network_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._delete_network_serialize( + _param = self._get_image_serialize( project_id=project_id, - network_id=network_id, + region=region, + image_id=image_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -8349,12 +14714,11 @@ def delete_network_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "202": None, + "200": "Image", "400": "Error", "401": "Error", "403": "Error", "404": "Error", - "409": "Error", "500": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -8365,15 +14729,15 @@ def delete_network_with_http_info( ) @validate_call - def delete_network_without_preload_content( + def get_image_without_preload_content( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - network_id: Annotated[ - str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Network."), + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + image_id: Annotated[ + str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Image.") ], _request_timeout: Union[ None, @@ -8385,14 +14749,16 @@ def delete_network_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Delete network. + """Get details about an image. - Delete a network. If the network is still in use, the deletion will fail. + Get details about a specific Image inside a project. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str - :param network_id: The identifier (ID) of a STACKIT Network. (required) - :type network_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param image_id: The identifier (ID) of a STACKIT Image. (required) + :type image_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -8415,9 +14781,10 @@ def delete_network_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._delete_network_serialize( + _param = self._get_image_serialize( project_id=project_id, - network_id=network_id, + region=region, + image_id=image_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -8425,21 +14792,21 @@ def delete_network_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "202": None, + "200": "Image", "400": "Error", "401": "Error", "403": "Error", "404": "Error", - "409": "Error", "500": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _delete_network_serialize( + def _get_image_serialize( self, project_id, - network_id, + region, + image_id, _request_auth, _content_type, _headers, @@ -8460,8 +14827,10 @@ def _delete_network_serialize( # process the path parameters if project_id is not None: _path_params["projectId"] = project_id - if network_id is not None: - _path_params["networkId"] = network_id + if region is not None: + _path_params["region"] = region + if image_id is not None: + _path_params["imageId"] = image_id # process the query parameters # process the header parameters # process the form parameters @@ -8475,8 +14844,8 @@ def _delete_network_serialize( _auth_settings: List[str] = [] return self.api_client.param_serialize( - method="DELETE", - resource_path="/v1/projects/{projectId}/networks/{networkId}", + method="GET", + resource_path="/v2beta1/projects/{projectId}/regions/{region}/images/{imageId}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -8490,19 +14859,15 @@ def _delete_network_serialize( ) @validate_call - def delete_network_area( + def get_image_share( self, - organization_id: Annotated[ + project_id: Annotated[ str, - Field( - min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Organization." - ), + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - area_id: Annotated[ - str, - Field( - min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Network Area." - ), + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + image_id: Annotated[ + str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Image.") ], _request_timeout: Union[ None, @@ -8513,15 +14878,17 @@ def delete_network_area( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> None: - """Delete a network area. + ) -> ImageShare: + """Get share details of an image. - Delete an existing network area in an organization. This is only possible if no projects are using the area anymore. + Get share details about an shared image. - :param organization_id: The identifier (ID) of a STACKIT Organization. (required) - :type organization_id: str - :param area_id: The identifier (ID) of a STACKIT Network Area. (required) - :type area_id: str + :param project_id: The identifier (ID) of a STACKIT Project. (required) + :type project_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param image_id: The identifier (ID) of a STACKIT Image. (required) + :type image_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -8544,9 +14911,10 @@ def delete_network_area( :return: Returns the result object. """ # noqa: E501 - _param = self._delete_network_area_serialize( - organization_id=organization_id, - area_id=area_id, + _param = self._get_image_share_serialize( + project_id=project_id, + region=region, + image_id=image_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -8554,12 +14922,11 @@ def delete_network_area( ) _response_types_map: Dict[str, Optional[str]] = { - "202": None, + "200": "ImageShare", "400": "Error", "401": "Error", "403": "Error", "404": "Error", - "409": "Error", "500": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -8570,19 +14937,15 @@ def delete_network_area( ).data @validate_call - def delete_network_area_with_http_info( + def get_image_share_with_http_info( self, - organization_id: Annotated[ + project_id: Annotated[ str, - Field( - min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Organization." - ), + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - area_id: Annotated[ - str, - Field( - min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Network Area." - ), + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + image_id: Annotated[ + str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Image.") ], _request_timeout: Union[ None, @@ -8593,15 +14956,17 @@ def delete_network_area_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[None]: - """Delete a network area. + ) -> ApiResponse[ImageShare]: + """Get share details of an image. - Delete an existing network area in an organization. This is only possible if no projects are using the area anymore. + Get share details about an shared image. - :param organization_id: The identifier (ID) of a STACKIT Organization. (required) - :type organization_id: str - :param area_id: The identifier (ID) of a STACKIT Network Area. (required) - :type area_id: str + :param project_id: The identifier (ID) of a STACKIT Project. (required) + :type project_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param image_id: The identifier (ID) of a STACKIT Image. (required) + :type image_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -8624,9 +14989,10 @@ def delete_network_area_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._delete_network_area_serialize( - organization_id=organization_id, - area_id=area_id, + _param = self._get_image_share_serialize( + project_id=project_id, + region=region, + image_id=image_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -8634,12 +15000,11 @@ def delete_network_area_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "202": None, + "200": "ImageShare", "400": "Error", "401": "Error", "403": "Error", "404": "Error", - "409": "Error", "500": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -8650,19 +15015,15 @@ def delete_network_area_with_http_info( ) @validate_call - def delete_network_area_without_preload_content( + def get_image_share_without_preload_content( self, - organization_id: Annotated[ + project_id: Annotated[ str, - Field( - min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Organization." - ), + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - area_id: Annotated[ - str, - Field( - min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Network Area." - ), + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + image_id: Annotated[ + str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Image.") ], _request_timeout: Union[ None, @@ -8674,14 +15035,16 @@ def delete_network_area_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Delete a network area. + """Get share details of an image. - Delete an existing network area in an organization. This is only possible if no projects are using the area anymore. + Get share details about an shared image. - :param organization_id: The identifier (ID) of a STACKIT Organization. (required) - :type organization_id: str - :param area_id: The identifier (ID) of a STACKIT Network Area. (required) - :type area_id: str + :param project_id: The identifier (ID) of a STACKIT Project. (required) + :type project_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param image_id: The identifier (ID) of a STACKIT Image. (required) + :type image_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -8704,9 +15067,10 @@ def delete_network_area_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._delete_network_area_serialize( - organization_id=organization_id, - area_id=area_id, + _param = self._get_image_share_serialize( + project_id=project_id, + region=region, + image_id=image_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -8714,21 +15078,21 @@ def delete_network_area_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "202": None, + "200": "ImageShare", "400": "Error", "401": "Error", "403": "Error", "404": "Error", - "409": "Error", "500": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _delete_network_area_serialize( + def _get_image_share_serialize( self, - organization_id, - area_id, + project_id, + region, + image_id, _request_auth, _content_type, _headers, @@ -8747,10 +15111,12 @@ def _delete_network_area_serialize( _body_params: Optional[bytes] = None # process the path parameters - if organization_id is not None: - _path_params["organizationId"] = organization_id - if area_id is not None: - _path_params["areaId"] = area_id + if project_id is not None: + _path_params["projectId"] = project_id + if region is not None: + _path_params["region"] = region + if image_id is not None: + _path_params["imageId"] = image_id # process the query parameters # process the header parameters # process the form parameters @@ -8764,8 +15130,8 @@ def _delete_network_area_serialize( _auth_settings: List[str] = [] return self.api_client.param_serialize( - method="DELETE", - resource_path="/v1/organizations/{organizationId}/network-areas/{areaId}", + method="GET", + resource_path="/v2beta1/projects/{projectId}/regions/{region}/images/{imageId}/share", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -8779,24 +15145,23 @@ def _delete_network_area_serialize( ) @validate_call - def delete_network_area_range( + def get_image_share_consumer( self, - organization_id: Annotated[ + project_id: Annotated[ str, - Field( - min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Organization." - ), + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - area_id: Annotated[ - str, - Field( - min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Network Area." - ), + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + image_id: Annotated[ + str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Image.") ], - network_range_id: Annotated[ + consumer_project_id: Annotated[ str, Field( - min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Network Range." + min_length=36, + strict=True, + max_length=36, + description="The identifier (ID) of a STACKIT Project that consumes an image share.", ), ], _request_timeout: Union[ @@ -8808,17 +15173,19 @@ def delete_network_area_range( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> None: - """Delete a network range. + ) -> ImageShareConsumer: + """Get image share consumer. - Delete a network range of a network area. The deletion will fail if the network range is still used. + Get details about an image share consumer. - :param organization_id: The identifier (ID) of a STACKIT Organization. (required) - :type organization_id: str - :param area_id: The identifier (ID) of a STACKIT Network Area. (required) - :type area_id: str - :param network_range_id: The identifier (ID) of a STACKIT Network Range. (required) - :type network_range_id: str + :param project_id: The identifier (ID) of a STACKIT Project. (required) + :type project_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param image_id: The identifier (ID) of a STACKIT Image. (required) + :type image_id: str + :param consumer_project_id: The identifier (ID) of a STACKIT Project that consumes an image share. (required) + :type consumer_project_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -8841,10 +15208,11 @@ def delete_network_area_range( :return: Returns the result object. """ # noqa: E501 - _param = self._delete_network_area_range_serialize( - organization_id=organization_id, - area_id=area_id, - network_range_id=network_range_id, + _param = self._get_image_share_consumer_serialize( + project_id=project_id, + region=region, + image_id=image_id, + consumer_project_id=consumer_project_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -8852,12 +15220,11 @@ def delete_network_area_range( ) _response_types_map: Dict[str, Optional[str]] = { - "202": None, + "200": "ImageShareConsumer", "400": "Error", "401": "Error", "403": "Error", "404": "Error", - "409": "Error", "500": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -8868,24 +15235,23 @@ def delete_network_area_range( ).data @validate_call - def delete_network_area_range_with_http_info( + def get_image_share_consumer_with_http_info( self, - organization_id: Annotated[ + project_id: Annotated[ str, - Field( - min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Organization." - ), + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - area_id: Annotated[ - str, - Field( - min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Network Area." - ), + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + image_id: Annotated[ + str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Image.") ], - network_range_id: Annotated[ + consumer_project_id: Annotated[ str, Field( - min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Network Range." + min_length=36, + strict=True, + max_length=36, + description="The identifier (ID) of a STACKIT Project that consumes an image share.", ), ], _request_timeout: Union[ @@ -8897,17 +15263,19 @@ def delete_network_area_range_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[None]: - """Delete a network range. + ) -> ApiResponse[ImageShareConsumer]: + """Get image share consumer. - Delete a network range of a network area. The deletion will fail if the network range is still used. + Get details about an image share consumer. - :param organization_id: The identifier (ID) of a STACKIT Organization. (required) - :type organization_id: str - :param area_id: The identifier (ID) of a STACKIT Network Area. (required) - :type area_id: str - :param network_range_id: The identifier (ID) of a STACKIT Network Range. (required) - :type network_range_id: str + :param project_id: The identifier (ID) of a STACKIT Project. (required) + :type project_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param image_id: The identifier (ID) of a STACKIT Image. (required) + :type image_id: str + :param consumer_project_id: The identifier (ID) of a STACKIT Project that consumes an image share. (required) + :type consumer_project_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -8930,10 +15298,11 @@ def delete_network_area_range_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._delete_network_area_range_serialize( - organization_id=organization_id, - area_id=area_id, - network_range_id=network_range_id, + _param = self._get_image_share_consumer_serialize( + project_id=project_id, + region=region, + image_id=image_id, + consumer_project_id=consumer_project_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -8941,12 +15310,11 @@ def delete_network_area_range_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "202": None, + "200": "ImageShareConsumer", "400": "Error", "401": "Error", "403": "Error", "404": "Error", - "409": "Error", "500": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -8957,24 +15325,23 @@ def delete_network_area_range_with_http_info( ) @validate_call - def delete_network_area_range_without_preload_content( + def get_image_share_consumer_without_preload_content( self, - organization_id: Annotated[ + project_id: Annotated[ str, - Field( - min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Organization." - ), + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - area_id: Annotated[ - str, - Field( - min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Network Area." - ), + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + image_id: Annotated[ + str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Image.") ], - network_range_id: Annotated[ + consumer_project_id: Annotated[ str, Field( - min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Network Range." + min_length=36, + strict=True, + max_length=36, + description="The identifier (ID) of a STACKIT Project that consumes an image share.", ), ], _request_timeout: Union[ @@ -8987,16 +15354,18 @@ def delete_network_area_range_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Delete a network range. + """Get image share consumer. - Delete a network range of a network area. The deletion will fail if the network range is still used. + Get details about an image share consumer. - :param organization_id: The identifier (ID) of a STACKIT Organization. (required) - :type organization_id: str - :param area_id: The identifier (ID) of a STACKIT Network Area. (required) - :type area_id: str - :param network_range_id: The identifier (ID) of a STACKIT Network Range. (required) - :type network_range_id: str + :param project_id: The identifier (ID) of a STACKIT Project. (required) + :type project_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param image_id: The identifier (ID) of a STACKIT Image. (required) + :type image_id: str + :param consumer_project_id: The identifier (ID) of a STACKIT Project that consumes an image share. (required) + :type consumer_project_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -9019,10 +15388,11 @@ def delete_network_area_range_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._delete_network_area_range_serialize( - organization_id=organization_id, - area_id=area_id, - network_range_id=network_range_id, + _param = self._get_image_share_consumer_serialize( + project_id=project_id, + region=region, + image_id=image_id, + consumer_project_id=consumer_project_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -9030,22 +15400,22 @@ def delete_network_area_range_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "202": None, + "200": "ImageShareConsumer", "400": "Error", "401": "Error", "403": "Error", "404": "Error", - "409": "Error", "500": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _delete_network_area_range_serialize( + def _get_image_share_consumer_serialize( self, - organization_id, - area_id, - network_range_id, + project_id, + region, + image_id, + consumer_project_id, _request_auth, _content_type, _headers, @@ -9064,12 +15434,14 @@ def _delete_network_area_range_serialize( _body_params: Optional[bytes] = None # process the path parameters - if organization_id is not None: - _path_params["organizationId"] = organization_id - if area_id is not None: - _path_params["areaId"] = area_id - if network_range_id is not None: - _path_params["networkRangeId"] = network_range_id + if project_id is not None: + _path_params["projectId"] = project_id + if region is not None: + _path_params["region"] = region + if image_id is not None: + _path_params["imageId"] = image_id + if consumer_project_id is not None: + _path_params["consumerProjectId"] = consumer_project_id # process the query parameters # process the header parameters # process the form parameters @@ -9083,8 +15455,8 @@ def _delete_network_area_range_serialize( _auth_settings: List[str] = [] return self.api_client.param_serialize( - method="DELETE", - resource_path="/v1/organizations/{organizationId}/network-areas/{areaId}/network-ranges/{networkRangeId}", + method="GET", + resource_path="/v2beta1/projects/{projectId}/regions/{region}/images/{imageId}/share/{consumerProjectId}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -9098,23 +15470,9 @@ def _delete_network_area_range_serialize( ) @validate_call - def delete_network_area_route( + def get_key_pair( self, - organization_id: Annotated[ - str, - Field( - min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Organization." - ), - ], - area_id: Annotated[ - str, - Field( - min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Network Area." - ), - ], - route_id: Annotated[ - str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Route.") - ], + keypair_name: Annotated[str, Field(strict=True, max_length=127, description="The name of an SSH keypair.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -9124,17 +15482,13 @@ def delete_network_area_route( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> None: - """Delete a network route. + ) -> Keypair: + """Get SSH keypair details. - Delete a network route of a network area. + Get details about an SSH keypair. - :param organization_id: The identifier (ID) of a STACKIT Organization. (required) - :type organization_id: str - :param area_id: The identifier (ID) of a STACKIT Network Area. (required) - :type area_id: str - :param route_id: The identifier (ID) of a STACKIT Route. (required) - :type route_id: str + :param keypair_name: The name of an SSH keypair. (required) + :type keypair_name: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -9157,10 +15511,8 @@ def delete_network_area_route( :return: Returns the result object. """ # noqa: E501 - _param = self._delete_network_area_route_serialize( - organization_id=organization_id, - area_id=area_id, - route_id=route_id, + _param = self._get_key_pair_serialize( + keypair_name=keypair_name, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -9168,7 +15520,7 @@ def delete_network_area_route( ) _response_types_map: Dict[str, Optional[str]] = { - "202": None, + "200": "Keypair", "400": "Error", "401": "Error", "403": "Error", @@ -9183,23 +15535,9 @@ def delete_network_area_route( ).data @validate_call - def delete_network_area_route_with_http_info( + def get_key_pair_with_http_info( self, - organization_id: Annotated[ - str, - Field( - min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Organization." - ), - ], - area_id: Annotated[ - str, - Field( - min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Network Area." - ), - ], - route_id: Annotated[ - str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Route.") - ], + keypair_name: Annotated[str, Field(strict=True, max_length=127, description="The name of an SSH keypair.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -9209,17 +15547,13 @@ def delete_network_area_route_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[None]: - """Delete a network route. + ) -> ApiResponse[Keypair]: + """Get SSH keypair details. - Delete a network route of a network area. + Get details about an SSH keypair. - :param organization_id: The identifier (ID) of a STACKIT Organization. (required) - :type organization_id: str - :param area_id: The identifier (ID) of a STACKIT Network Area. (required) - :type area_id: str - :param route_id: The identifier (ID) of a STACKIT Route. (required) - :type route_id: str + :param keypair_name: The name of an SSH keypair. (required) + :type keypair_name: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -9242,10 +15576,8 @@ def delete_network_area_route_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._delete_network_area_route_serialize( - organization_id=organization_id, - area_id=area_id, - route_id=route_id, + _param = self._get_key_pair_serialize( + keypair_name=keypair_name, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -9253,7 +15585,7 @@ def delete_network_area_route_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "202": None, + "200": "Keypair", "400": "Error", "401": "Error", "403": "Error", @@ -9268,23 +15600,9 @@ def delete_network_area_route_with_http_info( ) @validate_call - def delete_network_area_route_without_preload_content( + def get_key_pair_without_preload_content( self, - organization_id: Annotated[ - str, - Field( - min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Organization." - ), - ], - area_id: Annotated[ - str, - Field( - min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Network Area." - ), - ], - route_id: Annotated[ - str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Route.") - ], + keypair_name: Annotated[str, Field(strict=True, max_length=127, description="The name of an SSH keypair.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -9295,16 +15613,12 @@ def delete_network_area_route_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Delete a network route. + """Get SSH keypair details. - Delete a network route of a network area. + Get details about an SSH keypair. - :param organization_id: The identifier (ID) of a STACKIT Organization. (required) - :type organization_id: str - :param area_id: The identifier (ID) of a STACKIT Network Area. (required) - :type area_id: str - :param route_id: The identifier (ID) of a STACKIT Route. (required) - :type route_id: str + :param keypair_name: The name of an SSH keypair. (required) + :type keypair_name: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -9327,10 +15641,8 @@ def delete_network_area_route_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._delete_network_area_route_serialize( - organization_id=organization_id, - area_id=area_id, - route_id=route_id, + _param = self._get_key_pair_serialize( + keypair_name=keypair_name, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -9338,7 +15650,7 @@ def delete_network_area_route_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "202": None, + "200": "Keypair", "400": "Error", "401": "Error", "403": "Error", @@ -9348,11 +15660,9 @@ def delete_network_area_route_without_preload_content( response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _delete_network_area_route_serialize( + def _get_key_pair_serialize( self, - organization_id, - area_id, - route_id, + keypair_name, _request_auth, _content_type, _headers, @@ -9371,12 +15681,8 @@ def _delete_network_area_route_serialize( _body_params: Optional[bytes] = None # process the path parameters - if organization_id is not None: - _path_params["organizationId"] = organization_id - if area_id is not None: - _path_params["areaId"] = area_id - if route_id is not None: - _path_params["routeId"] = route_id + if keypair_name is not None: + _path_params["keypairName"] = keypair_name # process the query parameters # process the header parameters # process the form parameters @@ -9390,8 +15696,8 @@ def _delete_network_area_route_serialize( _auth_settings: List[str] = [] return self.api_client.param_serialize( - method="DELETE", - resource_path="/v1/organizations/{organizationId}/network-areas/{areaId}/routes/{routeId}", + method="GET", + resource_path="/v2beta1/keypairs/{keypairName}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -9405,20 +15711,14 @@ def _delete_network_area_route_serialize( ) @validate_call - def delete_nic( + def get_machine_type( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - network_id: Annotated[ - str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Network."), - ], - nic_id: Annotated[ - str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a network interface."), - ], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + machine_type: Annotated[str, Field(strict=True, max_length=127, description="STACKIT machine type Name.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -9428,17 +15728,17 @@ def delete_nic( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> None: - """Delete a network interface. + ) -> MachineType: + """Get details about a machine type. - Delete a network interface that is part of the project. + Get details about a specific machine type. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str - :param network_id: The identifier (ID) of a STACKIT Network. (required) - :type network_id: str - :param nic_id: The identifier (ID) of a network interface. (required) - :type nic_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param machine_type: STACKIT machine type Name. (required) + :type machine_type: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -9461,10 +15761,10 @@ def delete_nic( :return: Returns the result object. """ # noqa: E501 - _param = self._delete_nic_serialize( + _param = self._get_machine_type_serialize( project_id=project_id, - network_id=network_id, - nic_id=nic_id, + region=region, + machine_type=machine_type, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -9472,7 +15772,7 @@ def delete_nic( ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, + "200": "MachineType", "400": "Error", "401": "Error", "403": "Error", @@ -9487,20 +15787,14 @@ def delete_nic( ).data @validate_call - def delete_nic_with_http_info( + def get_machine_type_with_http_info( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - network_id: Annotated[ - str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Network."), - ], - nic_id: Annotated[ - str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a network interface."), - ], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + machine_type: Annotated[str, Field(strict=True, max_length=127, description="STACKIT machine type Name.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -9510,17 +15804,17 @@ def delete_nic_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[None]: - """Delete a network interface. + ) -> ApiResponse[MachineType]: + """Get details about a machine type. - Delete a network interface that is part of the project. + Get details about a specific machine type. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str - :param network_id: The identifier (ID) of a STACKIT Network. (required) - :type network_id: str - :param nic_id: The identifier (ID) of a network interface. (required) - :type nic_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param machine_type: STACKIT machine type Name. (required) + :type machine_type: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -9543,10 +15837,10 @@ def delete_nic_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._delete_nic_serialize( + _param = self._get_machine_type_serialize( project_id=project_id, - network_id=network_id, - nic_id=nic_id, + region=region, + machine_type=machine_type, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -9554,7 +15848,7 @@ def delete_nic_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, + "200": "MachineType", "400": "Error", "401": "Error", "403": "Error", @@ -9569,20 +15863,14 @@ def delete_nic_with_http_info( ) @validate_call - def delete_nic_without_preload_content( + def get_machine_type_without_preload_content( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - network_id: Annotated[ - str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Network."), - ], - nic_id: Annotated[ - str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a network interface."), - ], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + machine_type: Annotated[str, Field(strict=True, max_length=127, description="STACKIT machine type Name.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -9593,16 +15881,16 @@ def delete_nic_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Delete a network interface. + """Get details about a machine type. - Delete a network interface that is part of the project. + Get details about a specific machine type. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str - :param network_id: The identifier (ID) of a STACKIT Network. (required) - :type network_id: str - :param nic_id: The identifier (ID) of a network interface. (required) - :type nic_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param machine_type: STACKIT machine type Name. (required) + :type machine_type: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -9625,10 +15913,10 @@ def delete_nic_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._delete_nic_serialize( + _param = self._get_machine_type_serialize( project_id=project_id, - network_id=network_id, - nic_id=nic_id, + region=region, + machine_type=machine_type, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -9636,7 +15924,7 @@ def delete_nic_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, + "200": "MachineType", "400": "Error", "401": "Error", "403": "Error", @@ -9646,11 +15934,11 @@ def delete_nic_without_preload_content( response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _delete_nic_serialize( + def _get_machine_type_serialize( self, project_id, - network_id, - nic_id, + region, + machine_type, _request_auth, _content_type, _headers, @@ -9671,10 +15959,10 @@ def _delete_nic_serialize( # process the path parameters if project_id is not None: _path_params["projectId"] = project_id - if network_id is not None: - _path_params["networkId"] = network_id - if nic_id is not None: - _path_params["nicId"] = nic_id + if region is not None: + _path_params["region"] = region + if machine_type is not None: + _path_params["machineType"] = machine_type # process the query parameters # process the header parameters # process the form parameters @@ -9688,8 +15976,8 @@ def _delete_nic_serialize( _auth_settings: List[str] = [] return self.api_client.param_serialize( - method="DELETE", - resource_path="/v1/projects/{projectId}/networks/{networkId}/nics/{nicId}", + method="GET", + resource_path="/v2beta1/projects/{projectId}/regions/{region}/machine-types/{machineType}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -9703,14 +15991,15 @@ def _delete_nic_serialize( ) @validate_call - def delete_public_ip( + def get_management_network_route( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - public_ip_id: Annotated[ - str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a Public IP.") + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + route_id: Annotated[ + str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Route.") ], _request_timeout: Union[ None, @@ -9721,15 +16010,17 @@ def delete_public_ip( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> None: - """Delete a public IP. + ) -> ManagementRoute: + """Get management network route details. - Delete a public IP that is part of the project. + Get details about a management network route. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str - :param public_ip_id: The identifier (ID) of a Public IP. (required) - :type public_ip_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param route_id: The identifier (ID) of a STACKIT Route. (required) + :type route_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -9752,9 +16043,10 @@ def delete_public_ip( :return: Returns the result object. """ # noqa: E501 - _param = self._delete_public_ip_serialize( + _param = self._get_management_network_route_serialize( project_id=project_id, - public_ip_id=public_ip_id, + region=region, + route_id=route_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -9762,7 +16054,7 @@ def delete_public_ip( ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, + "200": "ManagementRoute", "400": "Error", "401": "Error", "403": "Error", @@ -9777,14 +16069,15 @@ def delete_public_ip( ).data @validate_call - def delete_public_ip_with_http_info( + def get_management_network_route_with_http_info( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - public_ip_id: Annotated[ - str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a Public IP.") + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + route_id: Annotated[ + str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Route.") ], _request_timeout: Union[ None, @@ -9795,15 +16088,17 @@ def delete_public_ip_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[None]: - """Delete a public IP. + ) -> ApiResponse[ManagementRoute]: + """Get management network route details. - Delete a public IP that is part of the project. + Get details about a management network route. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str - :param public_ip_id: The identifier (ID) of a Public IP. (required) - :type public_ip_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param route_id: The identifier (ID) of a STACKIT Route. (required) + :type route_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -9826,9 +16121,10 @@ def delete_public_ip_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._delete_public_ip_serialize( + _param = self._get_management_network_route_serialize( project_id=project_id, - public_ip_id=public_ip_id, + region=region, + route_id=route_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -9836,7 +16132,7 @@ def delete_public_ip_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, + "200": "ManagementRoute", "400": "Error", "401": "Error", "403": "Error", @@ -9851,14 +16147,15 @@ def delete_public_ip_with_http_info( ) @validate_call - def delete_public_ip_without_preload_content( + def get_management_network_route_without_preload_content( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - public_ip_id: Annotated[ - str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a Public IP.") + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + route_id: Annotated[ + str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Route.") ], _request_timeout: Union[ None, @@ -9870,14 +16167,16 @@ def delete_public_ip_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Delete a public IP. + """Get management network route details. - Delete a public IP that is part of the project. + Get details about a management network route. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str - :param public_ip_id: The identifier (ID) of a Public IP. (required) - :type public_ip_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param route_id: The identifier (ID) of a STACKIT Route. (required) + :type route_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -9900,9 +16199,10 @@ def delete_public_ip_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._delete_public_ip_serialize( + _param = self._get_management_network_route_serialize( project_id=project_id, - public_ip_id=public_ip_id, + region=region, + route_id=route_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -9910,7 +16210,7 @@ def delete_public_ip_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, + "200": "ManagementRoute", "400": "Error", "401": "Error", "403": "Error", @@ -9920,10 +16220,11 @@ def delete_public_ip_without_preload_content( response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _delete_public_ip_serialize( + def _get_management_network_route_serialize( self, project_id, - public_ip_id, + region, + route_id, _request_auth, _content_type, _headers, @@ -9944,8 +16245,10 @@ def _delete_public_ip_serialize( # process the path parameters if project_id is not None: _path_params["projectId"] = project_id - if public_ip_id is not None: - _path_params["publicIpId"] = public_ip_id + if region is not None: + _path_params["region"] = region + if route_id is not None: + _path_params["routeId"] = route_id # process the query parameters # process the header parameters # process the form parameters @@ -9959,8 +16262,8 @@ def _delete_public_ip_serialize( _auth_settings: List[str] = [] return self.api_client.param_serialize( - method="DELETE", - resource_path="/v1/projects/{projectId}/public-ips/{publicIpId}", + method="GET", + resource_path="/v2beta1/projects/{projectId}/regions/{region}/management-network/routes/{routeId}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -9974,20 +16277,16 @@ def _delete_public_ip_serialize( ) @validate_call - def delete_security_group( + def get_network( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - security_group_id: Annotated[ + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + network_id: Annotated[ str, - Field( - min_length=36, - strict=True, - max_length=36, - description="The identifier (ID) of a STACKIT Security Group.", - ), + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Network."), ], _request_timeout: Union[ None, @@ -9998,15 +16297,17 @@ def delete_security_group( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> None: - """Delete security group. + ) -> Network: + """Get network details. - Delete a security group. + Get details about a network of a project. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str - :param security_group_id: The identifier (ID) of a STACKIT Security Group. (required) - :type security_group_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param network_id: The identifier (ID) of a STACKIT Network. (required) + :type network_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -10029,9 +16330,10 @@ def delete_security_group( :return: Returns the result object. """ # noqa: E501 - _param = self._delete_security_group_serialize( + _param = self._get_network_serialize( project_id=project_id, - security_group_id=security_group_id, + region=region, + network_id=network_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -10039,12 +16341,11 @@ def delete_security_group( ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, + "200": "Network", "400": "Error", "401": "Error", "403": "Error", "404": "Error", - "409": "Error", "500": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -10055,20 +16356,16 @@ def delete_security_group( ).data @validate_call - def delete_security_group_with_http_info( + def get_network_with_http_info( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - security_group_id: Annotated[ + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + network_id: Annotated[ str, - Field( - min_length=36, - strict=True, - max_length=36, - description="The identifier (ID) of a STACKIT Security Group.", - ), + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Network."), ], _request_timeout: Union[ None, @@ -10079,15 +16376,17 @@ def delete_security_group_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[None]: - """Delete security group. + ) -> ApiResponse[Network]: + """Get network details. - Delete a security group. + Get details about a network of a project. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str - :param security_group_id: The identifier (ID) of a STACKIT Security Group. (required) - :type security_group_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param network_id: The identifier (ID) of a STACKIT Network. (required) + :type network_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -10110,9 +16409,10 @@ def delete_security_group_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._delete_security_group_serialize( + _param = self._get_network_serialize( project_id=project_id, - security_group_id=security_group_id, + region=region, + network_id=network_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -10120,12 +16420,11 @@ def delete_security_group_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, + "200": "Network", "400": "Error", "401": "Error", "403": "Error", "404": "Error", - "409": "Error", "500": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -10136,20 +16435,16 @@ def delete_security_group_with_http_info( ) @validate_call - def delete_security_group_without_preload_content( + def get_network_without_preload_content( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - security_group_id: Annotated[ + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + network_id: Annotated[ str, - Field( - min_length=36, - strict=True, - max_length=36, - description="The identifier (ID) of a STACKIT Security Group.", - ), + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Network."), ], _request_timeout: Union[ None, @@ -10161,14 +16456,16 @@ def delete_security_group_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Delete security group. + """Get network details. - Delete a security group. + Get details about a network of a project. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str - :param security_group_id: The identifier (ID) of a STACKIT Security Group. (required) - :type security_group_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param network_id: The identifier (ID) of a STACKIT Network. (required) + :type network_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -10191,9 +16488,10 @@ def delete_security_group_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._delete_security_group_serialize( + _param = self._get_network_serialize( project_id=project_id, - security_group_id=security_group_id, + region=region, + network_id=network_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -10201,21 +16499,21 @@ def delete_security_group_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, + "200": "Network", "400": "Error", "401": "Error", "403": "Error", "404": "Error", - "409": "Error", "500": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _delete_security_group_serialize( + def _get_network_serialize( self, project_id, - security_group_id, + region, + network_id, _request_auth, _content_type, _headers, @@ -10236,8 +16534,10 @@ def _delete_security_group_serialize( # process the path parameters if project_id is not None: _path_params["projectId"] = project_id - if security_group_id is not None: - _path_params["securityGroupId"] = security_group_id + if region is not None: + _path_params["region"] = region + if network_id is not None: + _path_params["networkId"] = network_id # process the query parameters # process the header parameters # process the form parameters @@ -10251,8 +16551,8 @@ def _delete_security_group_serialize( _auth_settings: List[str] = [] return self.api_client.param_serialize( - method="DELETE", - resource_path="/v1/projects/{projectId}/security-groups/{securityGroupId}", + method="GET", + resource_path="/v2beta1/projects/{projectId}/regions/{region}/networks/{networkId}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -10266,28 +16566,18 @@ def _delete_security_group_serialize( ) @validate_call - def delete_security_group_rule( + def get_network_area( self, - project_id: Annotated[ - str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), - ], - security_group_id: Annotated[ + organization_id: Annotated[ str, Field( - min_length=36, - strict=True, - max_length=36, - description="The identifier (ID) of a STACKIT Security Group.", + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Organization." ), ], - security_group_rule_id: Annotated[ + area_id: Annotated[ str, Field( - min_length=36, - strict=True, - max_length=36, - description="The identifier (ID) of a STACKIT Security Group Rule.", + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Network Area." ), ], _request_timeout: Union[ @@ -10299,17 +16589,15 @@ def delete_security_group_rule( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> None: - """Delete security group rule. + ) -> NetworkArea: + """Get details about a network area. - Delete a security group rule. + Get details about a network area in an organization. - :param project_id: The identifier (ID) of a STACKIT Project. (required) - :type project_id: str - :param security_group_id: The identifier (ID) of a STACKIT Security Group. (required) - :type security_group_id: str - :param security_group_rule_id: The identifier (ID) of a STACKIT Security Group Rule. (required) - :type security_group_rule_id: str + :param organization_id: The identifier (ID) of a STACKIT Organization. (required) + :type organization_id: str + :param area_id: The identifier (ID) of a STACKIT Network Area. (required) + :type area_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -10332,10 +16620,9 @@ def delete_security_group_rule( :return: Returns the result object. """ # noqa: E501 - _param = self._delete_security_group_rule_serialize( - project_id=project_id, - security_group_id=security_group_id, - security_group_rule_id=security_group_rule_id, + _param = self._get_network_area_serialize( + organization_id=organization_id, + area_id=area_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -10343,7 +16630,7 @@ def delete_security_group_rule( ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, + "200": "NetworkArea", "400": "Error", "401": "Error", "403": "Error", @@ -10358,28 +16645,18 @@ def delete_security_group_rule( ).data @validate_call - def delete_security_group_rule_with_http_info( + def get_network_area_with_http_info( self, - project_id: Annotated[ - str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), - ], - security_group_id: Annotated[ + organization_id: Annotated[ str, Field( - min_length=36, - strict=True, - max_length=36, - description="The identifier (ID) of a STACKIT Security Group.", + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Organization." ), ], - security_group_rule_id: Annotated[ + area_id: Annotated[ str, Field( - min_length=36, - strict=True, - max_length=36, - description="The identifier (ID) of a STACKIT Security Group Rule.", + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Network Area." ), ], _request_timeout: Union[ @@ -10391,17 +16668,15 @@ def delete_security_group_rule_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[None]: - """Delete security group rule. + ) -> ApiResponse[NetworkArea]: + """Get details about a network area. - Delete a security group rule. + Get details about a network area in an organization. - :param project_id: The identifier (ID) of a STACKIT Project. (required) - :type project_id: str - :param security_group_id: The identifier (ID) of a STACKIT Security Group. (required) - :type security_group_id: str - :param security_group_rule_id: The identifier (ID) of a STACKIT Security Group Rule. (required) - :type security_group_rule_id: str + :param organization_id: The identifier (ID) of a STACKIT Organization. (required) + :type organization_id: str + :param area_id: The identifier (ID) of a STACKIT Network Area. (required) + :type area_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -10424,10 +16699,9 @@ def delete_security_group_rule_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._delete_security_group_rule_serialize( - project_id=project_id, - security_group_id=security_group_id, - security_group_rule_id=security_group_rule_id, + _param = self._get_network_area_serialize( + organization_id=organization_id, + area_id=area_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -10435,7 +16709,7 @@ def delete_security_group_rule_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, + "200": "NetworkArea", "400": "Error", "401": "Error", "403": "Error", @@ -10450,28 +16724,18 @@ def delete_security_group_rule_with_http_info( ) @validate_call - def delete_security_group_rule_without_preload_content( + def get_network_area_without_preload_content( self, - project_id: Annotated[ - str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), - ], - security_group_id: Annotated[ + organization_id: Annotated[ str, Field( - min_length=36, - strict=True, - max_length=36, - description="The identifier (ID) of a STACKIT Security Group.", + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Organization." ), ], - security_group_rule_id: Annotated[ + area_id: Annotated[ str, Field( - min_length=36, - strict=True, - max_length=36, - description="The identifier (ID) of a STACKIT Security Group Rule.", + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Network Area." ), ], _request_timeout: Union[ @@ -10484,16 +16748,14 @@ def delete_security_group_rule_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Delete security group rule. + """Get details about a network area. - Delete a security group rule. + Get details about a network area in an organization. - :param project_id: The identifier (ID) of a STACKIT Project. (required) - :type project_id: str - :param security_group_id: The identifier (ID) of a STACKIT Security Group. (required) - :type security_group_id: str - :param security_group_rule_id: The identifier (ID) of a STACKIT Security Group Rule. (required) - :type security_group_rule_id: str + :param organization_id: The identifier (ID) of a STACKIT Organization. (required) + :type organization_id: str + :param area_id: The identifier (ID) of a STACKIT Network Area. (required) + :type area_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -10516,10 +16778,9 @@ def delete_security_group_rule_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._delete_security_group_rule_serialize( - project_id=project_id, - security_group_id=security_group_id, - security_group_rule_id=security_group_rule_id, + _param = self._get_network_area_serialize( + organization_id=organization_id, + area_id=area_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -10527,7 +16788,7 @@ def delete_security_group_rule_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, + "200": "NetworkArea", "400": "Error", "401": "Error", "403": "Error", @@ -10537,11 +16798,10 @@ def delete_security_group_rule_without_preload_content( response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _delete_security_group_rule_serialize( + def _get_network_area_serialize( self, - project_id, - security_group_id, - security_group_rule_id, + organization_id, + area_id, _request_auth, _content_type, _headers, @@ -10560,12 +16820,10 @@ def _delete_security_group_rule_serialize( _body_params: Optional[bytes] = None # process the path parameters - if project_id is not None: - _path_params["projectId"] = project_id - if security_group_id is not None: - _path_params["securityGroupId"] = security_group_id - if security_group_rule_id is not None: - _path_params["securityGroupRuleId"] = security_group_rule_id + if organization_id is not None: + _path_params["organizationId"] = organization_id + if area_id is not None: + _path_params["areaId"] = area_id # process the query parameters # process the header parameters # process the form parameters @@ -10579,8 +16837,8 @@ def _delete_security_group_rule_serialize( _auth_settings: List[str] = [] return self.api_client.param_serialize( - method="DELETE", - resource_path="/v1/projects/{projectId}/security-groups/{securityGroupId}/rules/{securityGroupRuleId}", + method="GET", + resource_path="/v2beta1/organizations/{organizationId}/network-areas/{areaId}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -10594,15 +16852,26 @@ def _delete_security_group_rule_serialize( ) @validate_call - def delete_server( + def get_network_area_range( self, - project_id: Annotated[ + organization_id: Annotated[ str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), + Field( + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Organization." + ), ], - server_id: Annotated[ + area_id: Annotated[ str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Server."), + Field( + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Network Area." + ), + ], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + network_range_id: Annotated[ + str, + Field( + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Network Range." + ), ], _request_timeout: Union[ None, @@ -10613,15 +16882,19 @@ def delete_server( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> None: - """Delete a server. + ) -> NetworkRange: + """Get details about a network range. - Delete a server. Volumes won't be deleted. + Get details about a network range in a network area. - :param project_id: The identifier (ID) of a STACKIT Project. (required) - :type project_id: str - :param server_id: The identifier (ID) of a STACKIT Server. (required) - :type server_id: str + :param organization_id: The identifier (ID) of a STACKIT Organization. (required) + :type organization_id: str + :param area_id: The identifier (ID) of a STACKIT Network Area. (required) + :type area_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param network_range_id: The identifier (ID) of a STACKIT Network Range. (required) + :type network_range_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -10644,9 +16917,11 @@ def delete_server( :return: Returns the result object. """ # noqa: E501 - _param = self._delete_server_serialize( - project_id=project_id, - server_id=server_id, + _param = self._get_network_area_range_serialize( + organization_id=organization_id, + area_id=area_id, + region=region, + network_range_id=network_range_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -10654,7 +16929,7 @@ def delete_server( ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, + "200": "NetworkRange", "400": "Error", "401": "Error", "403": "Error", @@ -10669,15 +16944,26 @@ def delete_server( ).data @validate_call - def delete_server_with_http_info( + def get_network_area_range_with_http_info( self, - project_id: Annotated[ + organization_id: Annotated[ str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), + Field( + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Organization." + ), ], - server_id: Annotated[ + area_id: Annotated[ str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Server."), + Field( + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Network Area." + ), + ], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + network_range_id: Annotated[ + str, + Field( + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Network Range." + ), ], _request_timeout: Union[ None, @@ -10688,15 +16974,19 @@ def delete_server_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[None]: - """Delete a server. + ) -> ApiResponse[NetworkRange]: + """Get details about a network range. - Delete a server. Volumes won't be deleted. + Get details about a network range in a network area. - :param project_id: The identifier (ID) of a STACKIT Project. (required) - :type project_id: str - :param server_id: The identifier (ID) of a STACKIT Server. (required) - :type server_id: str + :param organization_id: The identifier (ID) of a STACKIT Organization. (required) + :type organization_id: str + :param area_id: The identifier (ID) of a STACKIT Network Area. (required) + :type area_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param network_range_id: The identifier (ID) of a STACKIT Network Range. (required) + :type network_range_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -10719,9 +17009,11 @@ def delete_server_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._delete_server_serialize( - project_id=project_id, - server_id=server_id, + _param = self._get_network_area_range_serialize( + organization_id=organization_id, + area_id=area_id, + region=region, + network_range_id=network_range_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -10729,7 +17021,7 @@ def delete_server_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, + "200": "NetworkRange", "400": "Error", "401": "Error", "403": "Error", @@ -10744,15 +17036,26 @@ def delete_server_with_http_info( ) @validate_call - def delete_server_without_preload_content( + def get_network_area_range_without_preload_content( self, - project_id: Annotated[ + organization_id: Annotated[ str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), + Field( + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Organization." + ), ], - server_id: Annotated[ + area_id: Annotated[ str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Server."), + Field( + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Network Area." + ), + ], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + network_range_id: Annotated[ + str, + Field( + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Network Range." + ), ], _request_timeout: Union[ None, @@ -10764,14 +17067,18 @@ def delete_server_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Delete a server. + """Get details about a network range. - Delete a server. Volumes won't be deleted. + Get details about a network range in a network area. - :param project_id: The identifier (ID) of a STACKIT Project. (required) - :type project_id: str - :param server_id: The identifier (ID) of a STACKIT Server. (required) - :type server_id: str + :param organization_id: The identifier (ID) of a STACKIT Organization. (required) + :type organization_id: str + :param area_id: The identifier (ID) of a STACKIT Network Area. (required) + :type area_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param network_range_id: The identifier (ID) of a STACKIT Network Range. (required) + :type network_range_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -10794,9 +17101,11 @@ def delete_server_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._delete_server_serialize( - project_id=project_id, - server_id=server_id, + _param = self._get_network_area_range_serialize( + organization_id=organization_id, + area_id=area_id, + region=region, + network_range_id=network_range_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -10804,7 +17113,7 @@ def delete_server_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, + "200": "NetworkRange", "400": "Error", "401": "Error", "403": "Error", @@ -10814,10 +17123,12 @@ def delete_server_without_preload_content( response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _delete_server_serialize( + def _get_network_area_range_serialize( self, - project_id, - server_id, + organization_id, + area_id, + region, + network_range_id, _request_auth, _content_type, _headers, @@ -10836,10 +17147,14 @@ def _delete_server_serialize( _body_params: Optional[bytes] = None # process the path parameters - if project_id is not None: - _path_params["projectId"] = project_id - if server_id is not None: - _path_params["serverId"] = server_id + if organization_id is not None: + _path_params["organizationId"] = organization_id + if area_id is not None: + _path_params["areaId"] = area_id + if region is not None: + _path_params["region"] = region + if network_range_id is not None: + _path_params["networkRangeId"] = network_range_id # process the query parameters # process the header parameters # process the form parameters @@ -10853,8 +17168,8 @@ def _delete_server_serialize( _auth_settings: List[str] = [] return self.api_client.param_serialize( - method="DELETE", - resource_path="/v1/projects/{projectId}/servers/{serverId}", + method="GET", + resource_path="/v2beta1/organizations/{organizationId}/network-areas/{areaId}/regions/{region}/network-ranges/{networkRangeId}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -10868,15 +17183,23 @@ def _delete_server_serialize( ) @validate_call - def delete_snapshot( + def get_network_area_route( self, - project_id: Annotated[ + organization_id: Annotated[ str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), + Field( + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Organization." + ), ], - snapshot_id: Annotated[ + area_id: Annotated[ str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Snapshot."), + Field( + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Network Area." + ), + ], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + route_id: Annotated[ + str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Route.") ], _request_timeout: Union[ None, @@ -10887,15 +17210,19 @@ def delete_snapshot( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> None: - """Delete a snapshot. + ) -> Route: + """Get details about a network route. - Delete a snapshot that is part of the project. + Get details about a network route defined in a network area. - :param project_id: The identifier (ID) of a STACKIT Project. (required) - :type project_id: str - :param snapshot_id: The identifier (ID) of a STACKIT Snapshot. (required) - :type snapshot_id: str + :param organization_id: The identifier (ID) of a STACKIT Organization. (required) + :type organization_id: str + :param area_id: The identifier (ID) of a STACKIT Network Area. (required) + :type area_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param route_id: The identifier (ID) of a STACKIT Route. (required) + :type route_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -10918,9 +17245,11 @@ def delete_snapshot( :return: Returns the result object. """ # noqa: E501 - _param = self._delete_snapshot_serialize( - project_id=project_id, - snapshot_id=snapshot_id, + _param = self._get_network_area_route_serialize( + organization_id=organization_id, + area_id=area_id, + region=region, + route_id=route_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -10928,7 +17257,7 @@ def delete_snapshot( ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, + "200": "Route", "400": "Error", "401": "Error", "403": "Error", @@ -10943,15 +17272,23 @@ def delete_snapshot( ).data @validate_call - def delete_snapshot_with_http_info( + def get_network_area_route_with_http_info( self, - project_id: Annotated[ + organization_id: Annotated[ str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), + Field( + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Organization." + ), ], - snapshot_id: Annotated[ + area_id: Annotated[ str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Snapshot."), + Field( + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Network Area." + ), + ], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + route_id: Annotated[ + str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Route.") ], _request_timeout: Union[ None, @@ -10962,15 +17299,19 @@ def delete_snapshot_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[None]: - """Delete a snapshot. + ) -> ApiResponse[Route]: + """Get details about a network route. - Delete a snapshot that is part of the project. + Get details about a network route defined in a network area. - :param project_id: The identifier (ID) of a STACKIT Project. (required) - :type project_id: str - :param snapshot_id: The identifier (ID) of a STACKIT Snapshot. (required) - :type snapshot_id: str + :param organization_id: The identifier (ID) of a STACKIT Organization. (required) + :type organization_id: str + :param area_id: The identifier (ID) of a STACKIT Network Area. (required) + :type area_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param route_id: The identifier (ID) of a STACKIT Route. (required) + :type route_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -10993,9 +17334,11 @@ def delete_snapshot_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._delete_snapshot_serialize( - project_id=project_id, - snapshot_id=snapshot_id, + _param = self._get_network_area_route_serialize( + organization_id=organization_id, + area_id=area_id, + region=region, + route_id=route_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -11003,7 +17346,7 @@ def delete_snapshot_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, + "200": "Route", "400": "Error", "401": "Error", "403": "Error", @@ -11018,15 +17361,23 @@ def delete_snapshot_with_http_info( ) @validate_call - def delete_snapshot_without_preload_content( + def get_network_area_route_without_preload_content( self, - project_id: Annotated[ + organization_id: Annotated[ str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), + Field( + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Organization." + ), ], - snapshot_id: Annotated[ + area_id: Annotated[ str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Snapshot."), + Field( + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Network Area." + ), + ], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + route_id: Annotated[ + str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Route.") ], _request_timeout: Union[ None, @@ -11038,14 +17389,18 @@ def delete_snapshot_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Delete a snapshot. + """Get details about a network route. - Delete a snapshot that is part of the project. + Get details about a network route defined in a network area. - :param project_id: The identifier (ID) of a STACKIT Project. (required) - :type project_id: str - :param snapshot_id: The identifier (ID) of a STACKIT Snapshot. (required) - :type snapshot_id: str + :param organization_id: The identifier (ID) of a STACKIT Organization. (required) + :type organization_id: str + :param area_id: The identifier (ID) of a STACKIT Network Area. (required) + :type area_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param route_id: The identifier (ID) of a STACKIT Route. (required) + :type route_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -11068,9 +17423,11 @@ def delete_snapshot_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._delete_snapshot_serialize( - project_id=project_id, - snapshot_id=snapshot_id, + _param = self._get_network_area_route_serialize( + organization_id=organization_id, + area_id=area_id, + region=region, + route_id=route_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -11078,7 +17435,7 @@ def delete_snapshot_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, + "200": "Route", "400": "Error", "401": "Error", "403": "Error", @@ -11088,10 +17445,12 @@ def delete_snapshot_without_preload_content( response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _delete_snapshot_serialize( + def _get_network_area_route_serialize( self, - project_id, - snapshot_id, + organization_id, + area_id, + region, + route_id, _request_auth, _content_type, _headers, @@ -11110,10 +17469,14 @@ def _delete_snapshot_serialize( _body_params: Optional[bytes] = None # process the path parameters - if project_id is not None: - _path_params["projectId"] = project_id - if snapshot_id is not None: - _path_params["snapshotId"] = snapshot_id + if organization_id is not None: + _path_params["organizationId"] = organization_id + if area_id is not None: + _path_params["areaId"] = area_id + if region is not None: + _path_params["region"] = region + if route_id is not None: + _path_params["routeId"] = route_id # process the query parameters # process the header parameters # process the form parameters @@ -11127,8 +17490,8 @@ def _delete_snapshot_serialize( _auth_settings: List[str] = [] return self.api_client.param_serialize( - method="DELETE", - resource_path="/v1/projects/{projectId}/snapshots/{snapshotId}", + method="GET", + resource_path="/v2beta1/organizations/{organizationId}/network-areas/{areaId}/regions/{region}/routes/{routeId}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -11142,15 +17505,20 @@ def _delete_snapshot_serialize( ) @validate_call - def delete_volume( + def get_nic( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - volume_id: Annotated[ + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + network_id: Annotated[ str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Volume."), + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Network."), + ], + nic_id: Annotated[ + str, + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a network interface."), ], _request_timeout: Union[ None, @@ -11161,15 +17529,19 @@ def delete_volume( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> None: - """Delete a volume. + ) -> NIC: + """Get details about a network interface. - Delete a volume inside a project. The deletion will fail if the volume is still in use. + Get details about a network interface inside a network. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str - :param volume_id: The identifier (ID) of a STACKIT Volume. (required) - :type volume_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param network_id: The identifier (ID) of a STACKIT Network. (required) + :type network_id: str + :param nic_id: The identifier (ID) of a network interface. (required) + :type nic_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -11192,9 +17564,11 @@ def delete_volume( :return: Returns the result object. """ # noqa: E501 - _param = self._delete_volume_serialize( + _param = self._get_nic_serialize( project_id=project_id, - volume_id=volume_id, + region=region, + network_id=network_id, + nic_id=nic_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -11202,12 +17576,11 @@ def delete_volume( ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, + "200": "NIC", "400": "Error", "401": "Error", "403": "Error", "404": "Error", - "409": "Error", "500": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -11218,15 +17591,20 @@ def delete_volume( ).data @validate_call - def delete_volume_with_http_info( + def get_nic_with_http_info( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - volume_id: Annotated[ + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + network_id: Annotated[ str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Volume."), + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Network."), + ], + nic_id: Annotated[ + str, + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a network interface."), ], _request_timeout: Union[ None, @@ -11237,15 +17615,19 @@ def delete_volume_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[None]: - """Delete a volume. + ) -> ApiResponse[NIC]: + """Get details about a network interface. - Delete a volume inside a project. The deletion will fail if the volume is still in use. + Get details about a network interface inside a network. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str - :param volume_id: The identifier (ID) of a STACKIT Volume. (required) - :type volume_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param network_id: The identifier (ID) of a STACKIT Network. (required) + :type network_id: str + :param nic_id: The identifier (ID) of a network interface. (required) + :type nic_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -11268,9 +17650,11 @@ def delete_volume_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._delete_volume_serialize( + _param = self._get_nic_serialize( project_id=project_id, - volume_id=volume_id, + region=region, + network_id=network_id, + nic_id=nic_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -11278,12 +17662,11 @@ def delete_volume_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, + "200": "NIC", "400": "Error", "401": "Error", "403": "Error", "404": "Error", - "409": "Error", "500": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -11294,15 +17677,20 @@ def delete_volume_with_http_info( ) @validate_call - def delete_volume_without_preload_content( + def get_nic_without_preload_content( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - volume_id: Annotated[ + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + network_id: Annotated[ str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Volume."), + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Network."), + ], + nic_id: Annotated[ + str, + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a network interface."), ], _request_timeout: Union[ None, @@ -11314,14 +17702,18 @@ def delete_volume_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Delete a volume. + """Get details about a network interface. - Delete a volume inside a project. The deletion will fail if the volume is still in use. + Get details about a network interface inside a network. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str - :param volume_id: The identifier (ID) of a STACKIT Volume. (required) - :type volume_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param network_id: The identifier (ID) of a STACKIT Network. (required) + :type network_id: str + :param nic_id: The identifier (ID) of a network interface. (required) + :type nic_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -11344,9 +17736,11 @@ def delete_volume_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._delete_volume_serialize( + _param = self._get_nic_serialize( project_id=project_id, - volume_id=volume_id, + region=region, + network_id=network_id, + nic_id=nic_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -11354,21 +17748,22 @@ def delete_volume_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, + "200": "NIC", "400": "Error", "401": "Error", "403": "Error", "404": "Error", - "409": "Error", "500": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _delete_volume_serialize( + def _get_nic_serialize( self, project_id, - volume_id, + region, + network_id, + nic_id, _request_auth, _content_type, _headers, @@ -11389,8 +17784,12 @@ def _delete_volume_serialize( # process the path parameters if project_id is not None: _path_params["projectId"] = project_id - if volume_id is not None: - _path_params["volumeId"] = volume_id + if region is not None: + _path_params["region"] = region + if network_id is not None: + _path_params["networkId"] = network_id + if nic_id is not None: + _path_params["nicId"] = nic_id # process the query parameters # process the header parameters # process the form parameters @@ -11404,8 +17803,8 @@ def _delete_volume_serialize( _auth_settings: List[str] = [] return self.api_client.param_serialize( - method="DELETE", - resource_path="/v1/projects/{projectId}/volumes/{volumeId}", + method="GET", + resource_path="/v2beta1/projects/{projectId}/regions/{region}/networks/{networkId}/nics/{nicId}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -11419,21 +17818,18 @@ def _delete_volume_serialize( ) @validate_call - def get_affinity_group( + def get_organization_request( self, - project_id: Annotated[ - str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), - ], - affinity_group_id: Annotated[ + organization_id: Annotated[ str, Field( - min_length=36, - strict=True, - max_length=36, - description="The identifier (ID) of a STACKIT Affinity Group.", + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Organization." ), ], + request_id: Annotated[ + str, + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Request."), + ], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -11443,15 +17839,15 @@ def get_affinity_group( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> AffinityGroup: - """Get the affinity group. + ) -> Request: + """Lookup an organization request ID. - Get the affinity group created in a project. + Lookup an organization request ID from a previous request. This allows to find resource IDs of resources generated during a organization request. - :param project_id: The identifier (ID) of a STACKIT Project. (required) - :type project_id: str - :param affinity_group_id: The identifier (ID) of a STACKIT Affinity Group. (required) - :type affinity_group_id: str + :param organization_id: The identifier (ID) of a STACKIT Organization. (required) + :type organization_id: str + :param request_id: The identifier (ID) of a STACKIT Request. (required) + :type request_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -11474,9 +17870,9 @@ def get_affinity_group( :return: Returns the result object. """ # noqa: E501 - _param = self._get_affinity_group_serialize( - project_id=project_id, - affinity_group_id=affinity_group_id, + _param = self._get_organization_request_serialize( + organization_id=organization_id, + request_id=request_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -11484,7 +17880,7 @@ def get_affinity_group( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "AffinityGroup", + "200": "Request", "400": "Error", "401": "Error", "403": "Error", @@ -11499,21 +17895,18 @@ def get_affinity_group( ).data @validate_call - def get_affinity_group_with_http_info( + def get_organization_request_with_http_info( self, - project_id: Annotated[ - str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), - ], - affinity_group_id: Annotated[ + organization_id: Annotated[ str, Field( - min_length=36, - strict=True, - max_length=36, - description="The identifier (ID) of a STACKIT Affinity Group.", + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Organization." ), ], + request_id: Annotated[ + str, + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Request."), + ], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -11523,15 +17916,15 @@ def get_affinity_group_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[AffinityGroup]: - """Get the affinity group. + ) -> ApiResponse[Request]: + """Lookup an organization request ID. - Get the affinity group created in a project. + Lookup an organization request ID from a previous request. This allows to find resource IDs of resources generated during a organization request. - :param project_id: The identifier (ID) of a STACKIT Project. (required) - :type project_id: str - :param affinity_group_id: The identifier (ID) of a STACKIT Affinity Group. (required) - :type affinity_group_id: str + :param organization_id: The identifier (ID) of a STACKIT Organization. (required) + :type organization_id: str + :param request_id: The identifier (ID) of a STACKIT Request. (required) + :type request_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -11554,9 +17947,9 @@ def get_affinity_group_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._get_affinity_group_serialize( - project_id=project_id, - affinity_group_id=affinity_group_id, + _param = self._get_organization_request_serialize( + organization_id=organization_id, + request_id=request_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -11564,7 +17957,7 @@ def get_affinity_group_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "AffinityGroup", + "200": "Request", "400": "Error", "401": "Error", "403": "Error", @@ -11579,21 +17972,18 @@ def get_affinity_group_with_http_info( ) @validate_call - def get_affinity_group_without_preload_content( + def get_organization_request_without_preload_content( self, - project_id: Annotated[ - str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), - ], - affinity_group_id: Annotated[ + organization_id: Annotated[ str, Field( - min_length=36, - strict=True, - max_length=36, - description="The identifier (ID) of a STACKIT Affinity Group.", + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Organization." ), ], + request_id: Annotated[ + str, + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Request."), + ], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -11604,14 +17994,14 @@ def get_affinity_group_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Get the affinity group. + """Lookup an organization request ID. - Get the affinity group created in a project. + Lookup an organization request ID from a previous request. This allows to find resource IDs of resources generated during a organization request. - :param project_id: The identifier (ID) of a STACKIT Project. (required) - :type project_id: str - :param affinity_group_id: The identifier (ID) of a STACKIT Affinity Group. (required) - :type affinity_group_id: str + :param organization_id: The identifier (ID) of a STACKIT Organization. (required) + :type organization_id: str + :param request_id: The identifier (ID) of a STACKIT Request. (required) + :type request_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -11634,9 +18024,9 @@ def get_affinity_group_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._get_affinity_group_serialize( - project_id=project_id, - affinity_group_id=affinity_group_id, + _param = self._get_organization_request_serialize( + organization_id=organization_id, + request_id=request_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -11644,7 +18034,7 @@ def get_affinity_group_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "AffinityGroup", + "200": "Request", "400": "Error", "401": "Error", "403": "Error", @@ -11654,10 +18044,10 @@ def get_affinity_group_without_preload_content( response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _get_affinity_group_serialize( + def _get_organization_request_serialize( self, - project_id, - affinity_group_id, + organization_id, + request_id, _request_auth, _content_type, _headers, @@ -11676,10 +18066,10 @@ def _get_affinity_group_serialize( _body_params: Optional[bytes] = None # process the path parameters - if project_id is not None: - _path_params["projectId"] = project_id - if affinity_group_id is not None: - _path_params["affinityGroupId"] = affinity_group_id + if organization_id is not None: + _path_params["organizationId"] = organization_id + if request_id is not None: + _path_params["requestId"] = request_id # process the query parameters # process the header parameters # process the form parameters @@ -11694,7 +18084,7 @@ def _get_affinity_group_serialize( return self.api_client.param_serialize( method="GET", - resource_path="/v1/projects/{projectId}/affinity-groups/{affinityGroupId}", + resource_path="/v2beta1/organizations/{organizationId}/requests/{requestId}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -11708,20 +18098,12 @@ def _get_affinity_group_serialize( ) @validate_call - def get_attached_volume( + def get_project_details( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - server_id: Annotated[ - str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Server."), - ], - volume_id: Annotated[ - str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Volume."), - ], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -11731,17 +18113,13 @@ def get_attached_volume( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> VolumeAttachment: - """Get Volume Attachment details. + ) -> Project: + """Get project details. - Get the details of an existing Volume Attachment. + Get details about a STACKIT project. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str - :param server_id: The identifier (ID) of a STACKIT Server. (required) - :type server_id: str - :param volume_id: The identifier (ID) of a STACKIT Volume. (required) - :type volume_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -11764,10 +18142,8 @@ def get_attached_volume( :return: Returns the result object. """ # noqa: E501 - _param = self._get_attached_volume_serialize( + _param = self._get_project_details_serialize( project_id=project_id, - server_id=server_id, - volume_id=volume_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -11775,7 +18151,7 @@ def get_attached_volume( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "VolumeAttachment", + "200": "Project", "400": "Error", "401": "Error", "403": "Error", @@ -11790,20 +18166,12 @@ def get_attached_volume( ).data @validate_call - def get_attached_volume_with_http_info( + def get_project_details_with_http_info( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - server_id: Annotated[ - str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Server."), - ], - volume_id: Annotated[ - str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Volume."), - ], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -11813,17 +18181,13 @@ def get_attached_volume_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[VolumeAttachment]: - """Get Volume Attachment details. + ) -> ApiResponse[Project]: + """Get project details. - Get the details of an existing Volume Attachment. + Get details about a STACKIT project. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str - :param server_id: The identifier (ID) of a STACKIT Server. (required) - :type server_id: str - :param volume_id: The identifier (ID) of a STACKIT Volume. (required) - :type volume_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -11846,10 +18210,8 @@ def get_attached_volume_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._get_attached_volume_serialize( + _param = self._get_project_details_serialize( project_id=project_id, - server_id=server_id, - volume_id=volume_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -11857,7 +18219,7 @@ def get_attached_volume_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "VolumeAttachment", + "200": "Project", "400": "Error", "401": "Error", "403": "Error", @@ -11872,20 +18234,12 @@ def get_attached_volume_with_http_info( ) @validate_call - def get_attached_volume_without_preload_content( + def get_project_details_without_preload_content( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - server_id: Annotated[ - str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Server."), - ], - volume_id: Annotated[ - str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Volume."), - ], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -11896,16 +18250,12 @@ def get_attached_volume_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Get Volume Attachment details. + """Get project details. - Get the details of an existing Volume Attachment. + Get details about a STACKIT project. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str - :param server_id: The identifier (ID) of a STACKIT Server. (required) - :type server_id: str - :param volume_id: The identifier (ID) of a STACKIT Volume. (required) - :type volume_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -11928,10 +18278,8 @@ def get_attached_volume_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._get_attached_volume_serialize( + _param = self._get_project_details_serialize( project_id=project_id, - server_id=server_id, - volume_id=volume_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -11939,7 +18287,7 @@ def get_attached_volume_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "VolumeAttachment", + "200": "Project", "400": "Error", "401": "Error", "403": "Error", @@ -11949,11 +18297,9 @@ def get_attached_volume_without_preload_content( response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _get_attached_volume_serialize( + def _get_project_details_serialize( self, project_id, - server_id, - volume_id, _request_auth, _content_type, _headers, @@ -11974,10 +18320,6 @@ def _get_attached_volume_serialize( # process the path parameters if project_id is not None: _path_params["projectId"] = project_id - if server_id is not None: - _path_params["serverId"] = server_id - if volume_id is not None: - _path_params["volumeId"] = volume_id # process the query parameters # process the header parameters # process the form parameters @@ -11992,7 +18334,7 @@ def _get_attached_volume_serialize( return self.api_client.param_serialize( method="GET", - resource_path="/v1/projects/{projectId}/servers/{serverId}/volume-attachments/{volumeId}", + resource_path="/v2beta1/projects/{projectId}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -12006,15 +18348,16 @@ def _get_attached_volume_serialize( ) @validate_call - def get_backup( + def get_project_nic( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - backup_id: Annotated[ + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + nic_id: Annotated[ str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Backup."), + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a network interface."), ], _request_timeout: Union[ None, @@ -12025,15 +18368,17 @@ def get_backup( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> Backup: - """Get details about a backup. + ) -> NIC: + """Get details about a network interface of a project. - Get details about a block device backup. + Get details about a network interface inside a project. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str - :param backup_id: The identifier (ID) of a STACKIT Backup. (required) - :type backup_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param nic_id: The identifier (ID) of a network interface. (required) + :type nic_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -12056,9 +18401,10 @@ def get_backup( :return: Returns the result object. """ # noqa: E501 - _param = self._get_backup_serialize( + _param = self._get_project_nic_serialize( project_id=project_id, - backup_id=backup_id, + region=region, + nic_id=nic_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -12066,7 +18412,7 @@ def get_backup( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Backup", + "200": "NIC", "400": "Error", "401": "Error", "403": "Error", @@ -12081,15 +18427,16 @@ def get_backup( ).data @validate_call - def get_backup_with_http_info( + def get_project_nic_with_http_info( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - backup_id: Annotated[ + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + nic_id: Annotated[ str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Backup."), + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a network interface."), ], _request_timeout: Union[ None, @@ -12100,15 +18447,17 @@ def get_backup_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[Backup]: - """Get details about a backup. + ) -> ApiResponse[NIC]: + """Get details about a network interface of a project. - Get details about a block device backup. + Get details about a network interface inside a project. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str - :param backup_id: The identifier (ID) of a STACKIT Backup. (required) - :type backup_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param nic_id: The identifier (ID) of a network interface. (required) + :type nic_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -12131,9 +18480,10 @@ def get_backup_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._get_backup_serialize( + _param = self._get_project_nic_serialize( project_id=project_id, - backup_id=backup_id, + region=region, + nic_id=nic_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -12141,7 +18491,7 @@ def get_backup_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Backup", + "200": "NIC", "400": "Error", "401": "Error", "403": "Error", @@ -12156,15 +18506,16 @@ def get_backup_with_http_info( ) @validate_call - def get_backup_without_preload_content( + def get_project_nic_without_preload_content( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - backup_id: Annotated[ + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + nic_id: Annotated[ str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Backup."), + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a network interface."), ], _request_timeout: Union[ None, @@ -12176,14 +18527,16 @@ def get_backup_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Get details about a backup. + """Get details about a network interface of a project. - Get details about a block device backup. + Get details about a network interface inside a project. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str - :param backup_id: The identifier (ID) of a STACKIT Backup. (required) - :type backup_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param nic_id: The identifier (ID) of a network interface. (required) + :type nic_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -12206,9 +18559,10 @@ def get_backup_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._get_backup_serialize( + _param = self._get_project_nic_serialize( project_id=project_id, - backup_id=backup_id, + region=region, + nic_id=nic_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -12216,7 +18570,7 @@ def get_backup_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Backup", + "200": "NIC", "400": "Error", "401": "Error", "403": "Error", @@ -12226,10 +18580,11 @@ def get_backup_without_preload_content( response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _get_backup_serialize( + def _get_project_nic_serialize( self, project_id, - backup_id, + region, + nic_id, _request_auth, _content_type, _headers, @@ -12250,8 +18605,10 @@ def _get_backup_serialize( # process the path parameters if project_id is not None: _path_params["projectId"] = project_id - if backup_id is not None: - _path_params["backupId"] = backup_id + if region is not None: + _path_params["region"] = region + if nic_id is not None: + _path_params["nicId"] = nic_id # process the query parameters # process the header parameters # process the form parameters @@ -12266,7 +18623,7 @@ def _get_backup_serialize( return self.api_client.param_serialize( method="GET", - resource_path="/v1/projects/{projectId}/backups/{backupId}", + resource_path="/v2beta1/projects/{projectId}/regions/{region}/nics/{nicId}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -12280,14 +18637,16 @@ def _get_backup_serialize( ) @validate_call - def get_image( + def get_project_request( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - image_id: Annotated[ - str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Image.") + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + request_id: Annotated[ + str, + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Request."), ], _request_timeout: Union[ None, @@ -12298,15 +18657,17 @@ def get_image( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> Image: - """Get details about an image. + ) -> Request: + """Lookup a project request ID. - Get details about a specific Image inside a project. + Lookup a project request ID from a previous request. This allows to find resource IDs of resources generated during a projects request. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str - :param image_id: The identifier (ID) of a STACKIT Image. (required) - :type image_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param request_id: The identifier (ID) of a STACKIT Request. (required) + :type request_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -12329,9 +18690,10 @@ def get_image( :return: Returns the result object. """ # noqa: E501 - _param = self._get_image_serialize( + _param = self._get_project_request_serialize( project_id=project_id, - image_id=image_id, + region=region, + request_id=request_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -12339,7 +18701,7 @@ def get_image( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Image", + "200": "Request", "400": "Error", "401": "Error", "403": "Error", @@ -12354,14 +18716,16 @@ def get_image( ).data @validate_call - def get_image_with_http_info( + def get_project_request_with_http_info( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - image_id: Annotated[ - str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Image.") + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + request_id: Annotated[ + str, + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Request."), ], _request_timeout: Union[ None, @@ -12372,15 +18736,17 @@ def get_image_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[Image]: - """Get details about an image. + ) -> ApiResponse[Request]: + """Lookup a project request ID. - Get details about a specific Image inside a project. + Lookup a project request ID from a previous request. This allows to find resource IDs of resources generated during a projects request. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str - :param image_id: The identifier (ID) of a STACKIT Image. (required) - :type image_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param request_id: The identifier (ID) of a STACKIT Request. (required) + :type request_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -12403,9 +18769,10 @@ def get_image_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._get_image_serialize( + _param = self._get_project_request_serialize( project_id=project_id, - image_id=image_id, + region=region, + request_id=request_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -12413,7 +18780,7 @@ def get_image_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Image", + "200": "Request", "400": "Error", "401": "Error", "403": "Error", @@ -12428,14 +18795,16 @@ def get_image_with_http_info( ) @validate_call - def get_image_without_preload_content( + def get_project_request_without_preload_content( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - image_id: Annotated[ - str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Image.") + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + request_id: Annotated[ + str, + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Request."), ], _request_timeout: Union[ None, @@ -12447,14 +18816,16 @@ def get_image_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Get details about an image. + """Lookup a project request ID. - Get details about a specific Image inside a project. + Lookup a project request ID from a previous request. This allows to find resource IDs of resources generated during a projects request. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str - :param image_id: The identifier (ID) of a STACKIT Image. (required) - :type image_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param request_id: The identifier (ID) of a STACKIT Request. (required) + :type request_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -12477,9 +18848,10 @@ def get_image_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._get_image_serialize( + _param = self._get_project_request_serialize( project_id=project_id, - image_id=image_id, + region=region, + request_id=request_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -12487,7 +18859,7 @@ def get_image_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Image", + "200": "Request", "400": "Error", "401": "Error", "403": "Error", @@ -12497,10 +18869,11 @@ def get_image_without_preload_content( response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _get_image_serialize( + def _get_project_request_serialize( self, project_id, - image_id, + region, + request_id, _request_auth, _content_type, _headers, @@ -12521,8 +18894,10 @@ def _get_image_serialize( # process the path parameters if project_id is not None: _path_params["projectId"] = project_id - if image_id is not None: - _path_params["imageId"] = image_id + if region is not None: + _path_params["region"] = region + if request_id is not None: + _path_params["requestId"] = request_id # process the query parameters # process the header parameters # process the form parameters @@ -12537,7 +18912,7 @@ def _get_image_serialize( return self.api_client.param_serialize( method="GET", - resource_path="/v1/projects/{projectId}/images/{imageId}", + resource_path="/v2beta1/projects/{projectId}/regions/{region}/requests/{requestId}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -12551,14 +18926,15 @@ def _get_image_serialize( ) @validate_call - def get_image_share( + def get_public_ip( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - image_id: Annotated[ - str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Image.") + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + public_ip_id: Annotated[ + str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a Public IP.") ], _request_timeout: Union[ None, @@ -12569,15 +18945,17 @@ def get_image_share( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ImageShare: - """Get share details of an image. + ) -> PublicIp: + """Get details about a public IP. - Get share details about an shared image. + Get details about a public IP inside a project. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str - :param image_id: The identifier (ID) of a STACKIT Image. (required) - :type image_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param public_ip_id: The identifier (ID) of a Public IP. (required) + :type public_ip_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -12600,9 +18978,10 @@ def get_image_share( :return: Returns the result object. """ # noqa: E501 - _param = self._get_image_share_serialize( + _param = self._get_public_ip_serialize( project_id=project_id, - image_id=image_id, + region=region, + public_ip_id=public_ip_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -12610,7 +18989,7 @@ def get_image_share( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ImageShare", + "200": "PublicIp", "400": "Error", "401": "Error", "403": "Error", @@ -12625,14 +19004,15 @@ def get_image_share( ).data @validate_call - def get_image_share_with_http_info( + def get_public_ip_with_http_info( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - image_id: Annotated[ - str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Image.") + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + public_ip_id: Annotated[ + str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a Public IP.") ], _request_timeout: Union[ None, @@ -12643,15 +19023,17 @@ def get_image_share_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[ImageShare]: - """Get share details of an image. + ) -> ApiResponse[PublicIp]: + """Get details about a public IP. - Get share details about an shared image. + Get details about a public IP inside a project. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str - :param image_id: The identifier (ID) of a STACKIT Image. (required) - :type image_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param public_ip_id: The identifier (ID) of a Public IP. (required) + :type public_ip_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -12674,9 +19056,10 @@ def get_image_share_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._get_image_share_serialize( + _param = self._get_public_ip_serialize( project_id=project_id, - image_id=image_id, + region=region, + public_ip_id=public_ip_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -12684,7 +19067,7 @@ def get_image_share_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ImageShare", + "200": "PublicIp", "400": "Error", "401": "Error", "403": "Error", @@ -12699,14 +19082,15 @@ def get_image_share_with_http_info( ) @validate_call - def get_image_share_without_preload_content( + def get_public_ip_without_preload_content( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - image_id: Annotated[ - str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Image.") + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + public_ip_id: Annotated[ + str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a Public IP.") ], _request_timeout: Union[ None, @@ -12718,14 +19102,16 @@ def get_image_share_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Get share details of an image. + """Get details about a public IP. - Get share details about an shared image. + Get details about a public IP inside a project. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str - :param image_id: The identifier (ID) of a STACKIT Image. (required) - :type image_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param public_ip_id: The identifier (ID) of a Public IP. (required) + :type public_ip_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -12748,9 +19134,10 @@ def get_image_share_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._get_image_share_serialize( + _param = self._get_public_ip_serialize( project_id=project_id, - image_id=image_id, + region=region, + public_ip_id=public_ip_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -12758,7 +19145,7 @@ def get_image_share_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ImageShare", + "200": "PublicIp", "400": "Error", "401": "Error", "403": "Error", @@ -12768,10 +19155,11 @@ def get_image_share_without_preload_content( response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _get_image_share_serialize( + def _get_public_ip_serialize( self, project_id, - image_id, + region, + public_ip_id, _request_auth, _content_type, _headers, @@ -12792,8 +19180,10 @@ def _get_image_share_serialize( # process the path parameters if project_id is not None: _path_params["projectId"] = project_id - if image_id is not None: - _path_params["imageId"] = image_id + if region is not None: + _path_params["region"] = region + if public_ip_id is not None: + _path_params["publicIpId"] = public_ip_id # process the query parameters # process the header parameters # process the form parameters @@ -12808,7 +19198,7 @@ def _get_image_share_serialize( return self.api_client.param_serialize( method="GET", - resource_path="/v1/projects/{projectId}/images/{imageId}/share", + resource_path="/v2beta1/projects/{projectId}/regions/{region}/public-ips/{publicIpId}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -12822,24 +19212,30 @@ def _get_image_share_serialize( ) @validate_call - def get_image_share_consumer( + def get_route_of_routing_table( self, - project_id: Annotated[ + organization_id: Annotated[ str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), + Field( + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Organization." + ), ], - image_id: Annotated[ - str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Image.") + area_id: Annotated[ + str, + Field( + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Network Area." + ), ], - consumer_project_id: Annotated[ + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + routing_table_id: Annotated[ str, Field( - min_length=36, - strict=True, - max_length=36, - description="The identifier (ID) of a STACKIT Project that consumes an image share.", + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Routing Table." ), ], + route_id: Annotated[ + str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Route.") + ], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -12849,17 +19245,21 @@ def get_image_share_consumer( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ImageShareConsumer: - """Get image share consumer. + ) -> Route: + """Get details about a route of a routing table. - Get details about an image share consumer. + Get details about a route defined in a routing table. - :param project_id: The identifier (ID) of a STACKIT Project. (required) - :type project_id: str - :param image_id: The identifier (ID) of a STACKIT Image. (required) - :type image_id: str - :param consumer_project_id: The identifier (ID) of a STACKIT Project that consumes an image share. (required) - :type consumer_project_id: str + :param organization_id: The identifier (ID) of a STACKIT Organization. (required) + :type organization_id: str + :param area_id: The identifier (ID) of a STACKIT Network Area. (required) + :type area_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param routing_table_id: The identifier (ID) of a STACKIT Routing Table. (required) + :type routing_table_id: str + :param route_id: The identifier (ID) of a STACKIT Route. (required) + :type route_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -12882,10 +19282,12 @@ def get_image_share_consumer( :return: Returns the result object. """ # noqa: E501 - _param = self._get_image_share_consumer_serialize( - project_id=project_id, - image_id=image_id, - consumer_project_id=consumer_project_id, + _param = self._get_route_of_routing_table_serialize( + organization_id=organization_id, + area_id=area_id, + region=region, + routing_table_id=routing_table_id, + route_id=route_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -12893,7 +19295,7 @@ def get_image_share_consumer( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ImageShareConsumer", + "200": "Route", "400": "Error", "401": "Error", "403": "Error", @@ -12908,24 +19310,30 @@ def get_image_share_consumer( ).data @validate_call - def get_image_share_consumer_with_http_info( + def get_route_of_routing_table_with_http_info( self, - project_id: Annotated[ + organization_id: Annotated[ str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), + Field( + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Organization." + ), ], - image_id: Annotated[ - str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Image.") + area_id: Annotated[ + str, + Field( + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Network Area." + ), ], - consumer_project_id: Annotated[ + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + routing_table_id: Annotated[ str, Field( - min_length=36, - strict=True, - max_length=36, - description="The identifier (ID) of a STACKIT Project that consumes an image share.", + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Routing Table." ), ], + route_id: Annotated[ + str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Route.") + ], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -12935,17 +19343,21 @@ def get_image_share_consumer_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[ImageShareConsumer]: - """Get image share consumer. + ) -> ApiResponse[Route]: + """Get details about a route of a routing table. - Get details about an image share consumer. + Get details about a route defined in a routing table. - :param project_id: The identifier (ID) of a STACKIT Project. (required) - :type project_id: str - :param image_id: The identifier (ID) of a STACKIT Image. (required) - :type image_id: str - :param consumer_project_id: The identifier (ID) of a STACKIT Project that consumes an image share. (required) - :type consumer_project_id: str + :param organization_id: The identifier (ID) of a STACKIT Organization. (required) + :type organization_id: str + :param area_id: The identifier (ID) of a STACKIT Network Area. (required) + :type area_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param routing_table_id: The identifier (ID) of a STACKIT Routing Table. (required) + :type routing_table_id: str + :param route_id: The identifier (ID) of a STACKIT Route. (required) + :type route_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -12968,10 +19380,12 @@ def get_image_share_consumer_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._get_image_share_consumer_serialize( - project_id=project_id, - image_id=image_id, - consumer_project_id=consumer_project_id, + _param = self._get_route_of_routing_table_serialize( + organization_id=organization_id, + area_id=area_id, + region=region, + routing_table_id=routing_table_id, + route_id=route_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -12979,7 +19393,7 @@ def get_image_share_consumer_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ImageShareConsumer", + "200": "Route", "400": "Error", "401": "Error", "403": "Error", @@ -12994,24 +19408,30 @@ def get_image_share_consumer_with_http_info( ) @validate_call - def get_image_share_consumer_without_preload_content( + def get_route_of_routing_table_without_preload_content( self, - project_id: Annotated[ + organization_id: Annotated[ str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), + Field( + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Organization." + ), ], - image_id: Annotated[ - str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Image.") + area_id: Annotated[ + str, + Field( + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Network Area." + ), ], - consumer_project_id: Annotated[ + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + routing_table_id: Annotated[ str, Field( - min_length=36, - strict=True, - max_length=36, - description="The identifier (ID) of a STACKIT Project that consumes an image share.", + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Routing Table." ), ], + route_id: Annotated[ + str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Route.") + ], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -13022,16 +19442,20 @@ def get_image_share_consumer_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Get image share consumer. + """Get details about a route of a routing table. - Get details about an image share consumer. + Get details about a route defined in a routing table. - :param project_id: The identifier (ID) of a STACKIT Project. (required) - :type project_id: str - :param image_id: The identifier (ID) of a STACKIT Image. (required) - :type image_id: str - :param consumer_project_id: The identifier (ID) of a STACKIT Project that consumes an image share. (required) - :type consumer_project_id: str + :param organization_id: The identifier (ID) of a STACKIT Organization. (required) + :type organization_id: str + :param area_id: The identifier (ID) of a STACKIT Network Area. (required) + :type area_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param routing_table_id: The identifier (ID) of a STACKIT Routing Table. (required) + :type routing_table_id: str + :param route_id: The identifier (ID) of a STACKIT Route. (required) + :type route_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -13054,10 +19478,12 @@ def get_image_share_consumer_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._get_image_share_consumer_serialize( - project_id=project_id, - image_id=image_id, - consumer_project_id=consumer_project_id, + _param = self._get_route_of_routing_table_serialize( + organization_id=organization_id, + area_id=area_id, + region=region, + routing_table_id=routing_table_id, + route_id=route_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -13065,7 +19491,7 @@ def get_image_share_consumer_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ImageShareConsumer", + "200": "Route", "400": "Error", "401": "Error", "403": "Error", @@ -13075,11 +19501,13 @@ def get_image_share_consumer_without_preload_content( response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _get_image_share_consumer_serialize( + def _get_route_of_routing_table_serialize( self, - project_id, - image_id, - consumer_project_id, + organization_id, + area_id, + region, + routing_table_id, + route_id, _request_auth, _content_type, _headers, @@ -13098,12 +19526,16 @@ def _get_image_share_consumer_serialize( _body_params: Optional[bytes] = None # process the path parameters - if project_id is not None: - _path_params["projectId"] = project_id - if image_id is not None: - _path_params["imageId"] = image_id - if consumer_project_id is not None: - _path_params["consumerProjectId"] = consumer_project_id + if organization_id is not None: + _path_params["organizationId"] = organization_id + if area_id is not None: + _path_params["areaId"] = area_id + if region is not None: + _path_params["region"] = region + if routing_table_id is not None: + _path_params["routingTableId"] = routing_table_id + if route_id is not None: + _path_params["routeId"] = route_id # process the query parameters # process the header parameters # process the form parameters @@ -13118,7 +19550,7 @@ def _get_image_share_consumer_serialize( return self.api_client.param_serialize( method="GET", - resource_path="/v1/projects/{projectId}/images/{imageId}/share/{consumerProjectId}", + resource_path="/v2beta1/organizations/{organizationId}/network-areas/{areaId}/regions/{region}/routing-tables/{routingTableId}/routes/{routeId}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -13132,9 +19564,27 @@ def _get_image_share_consumer_serialize( ) @validate_call - def get_key_pair( + def get_routing_table_of_area( self, - keypair_name: Annotated[str, Field(strict=True, max_length=127, description="The name of an SSH keypair.")], + organization_id: Annotated[ + str, + Field( + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Organization." + ), + ], + area_id: Annotated[ + str, + Field( + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Network Area." + ), + ], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + routing_table_id: Annotated[ + str, + Field( + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Routing Table." + ), + ], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -13144,13 +19594,19 @@ def get_key_pair( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> Keypair: - """Get SSH keypair details. + ) -> RoutingTable: + """Get details about a routing table. - Get details about an SSH keypair. + Get details about a routing table defined in a network area. - :param keypair_name: The name of an SSH keypair. (required) - :type keypair_name: str + :param organization_id: The identifier (ID) of a STACKIT Organization. (required) + :type organization_id: str + :param area_id: The identifier (ID) of a STACKIT Network Area. (required) + :type area_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param routing_table_id: The identifier (ID) of a STACKIT Routing Table. (required) + :type routing_table_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -13173,8 +19629,11 @@ def get_key_pair( :return: Returns the result object. """ # noqa: E501 - _param = self._get_key_pair_serialize( - keypair_name=keypair_name, + _param = self._get_routing_table_of_area_serialize( + organization_id=organization_id, + area_id=area_id, + region=region, + routing_table_id=routing_table_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -13182,7 +19641,7 @@ def get_key_pair( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Keypair", + "200": "RoutingTable", "400": "Error", "401": "Error", "403": "Error", @@ -13197,9 +19656,27 @@ def get_key_pair( ).data @validate_call - def get_key_pair_with_http_info( + def get_routing_table_of_area_with_http_info( self, - keypair_name: Annotated[str, Field(strict=True, max_length=127, description="The name of an SSH keypair.")], + organization_id: Annotated[ + str, + Field( + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Organization." + ), + ], + area_id: Annotated[ + str, + Field( + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Network Area." + ), + ], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + routing_table_id: Annotated[ + str, + Field( + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Routing Table." + ), + ], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -13209,13 +19686,19 @@ def get_key_pair_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[Keypair]: - """Get SSH keypair details. + ) -> ApiResponse[RoutingTable]: + """Get details about a routing table. - Get details about an SSH keypair. + Get details about a routing table defined in a network area. - :param keypair_name: The name of an SSH keypair. (required) - :type keypair_name: str + :param organization_id: The identifier (ID) of a STACKIT Organization. (required) + :type organization_id: str + :param area_id: The identifier (ID) of a STACKIT Network Area. (required) + :type area_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param routing_table_id: The identifier (ID) of a STACKIT Routing Table. (required) + :type routing_table_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -13238,8 +19721,11 @@ def get_key_pair_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._get_key_pair_serialize( - keypair_name=keypair_name, + _param = self._get_routing_table_of_area_serialize( + organization_id=organization_id, + area_id=area_id, + region=region, + routing_table_id=routing_table_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -13247,7 +19733,7 @@ def get_key_pair_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Keypair", + "200": "RoutingTable", "400": "Error", "401": "Error", "403": "Error", @@ -13262,9 +19748,27 @@ def get_key_pair_with_http_info( ) @validate_call - def get_key_pair_without_preload_content( + def get_routing_table_of_area_without_preload_content( self, - keypair_name: Annotated[str, Field(strict=True, max_length=127, description="The name of an SSH keypair.")], + organization_id: Annotated[ + str, + Field( + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Organization." + ), + ], + area_id: Annotated[ + str, + Field( + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Network Area." + ), + ], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + routing_table_id: Annotated[ + str, + Field( + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Routing Table." + ), + ], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -13275,12 +19779,18 @@ def get_key_pair_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Get SSH keypair details. + """Get details about a routing table. - Get details about an SSH keypair. + Get details about a routing table defined in a network area. - :param keypair_name: The name of an SSH keypair. (required) - :type keypair_name: str + :param organization_id: The identifier (ID) of a STACKIT Organization. (required) + :type organization_id: str + :param area_id: The identifier (ID) of a STACKIT Network Area. (required) + :type area_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param routing_table_id: The identifier (ID) of a STACKIT Routing Table. (required) + :type routing_table_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -13303,8 +19813,11 @@ def get_key_pair_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._get_key_pair_serialize( - keypair_name=keypair_name, + _param = self._get_routing_table_of_area_serialize( + organization_id=organization_id, + area_id=area_id, + region=region, + routing_table_id=routing_table_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -13312,7 +19825,7 @@ def get_key_pair_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Keypair", + "200": "RoutingTable", "400": "Error", "401": "Error", "403": "Error", @@ -13322,9 +19835,12 @@ def get_key_pair_without_preload_content( response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _get_key_pair_serialize( + def _get_routing_table_of_area_serialize( self, - keypair_name, + organization_id, + area_id, + region, + routing_table_id, _request_auth, _content_type, _headers, @@ -13343,8 +19859,14 @@ def _get_key_pair_serialize( _body_params: Optional[bytes] = None # process the path parameters - if keypair_name is not None: - _path_params["keypairName"] = keypair_name + if organization_id is not None: + _path_params["organizationId"] = organization_id + if area_id is not None: + _path_params["areaId"] = area_id + if region is not None: + _path_params["region"] = region + if routing_table_id is not None: + _path_params["routingTableId"] = routing_table_id # process the query parameters # process the header parameters # process the form parameters @@ -13359,7 +19881,7 @@ def _get_key_pair_serialize( return self.api_client.param_serialize( method="GET", - resource_path="/v1/keypairs/{keypairName}", + resource_path="/v2beta1/organizations/{organizationId}/network-areas/{areaId}/regions/{region}/routing-tables/{routingTableId}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -13373,13 +19895,22 @@ def _get_key_pair_serialize( ) @validate_call - def get_machine_type( + def get_security_group( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - machine_type: Annotated[str, Field(strict=True, max_length=127, description="STACKIT machine type Name.")], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + security_group_id: Annotated[ + str, + Field( + min_length=36, + strict=True, + max_length=36, + description="The identifier (ID) of a STACKIT Security Group.", + ), + ], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -13389,15 +19920,17 @@ def get_machine_type( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> MachineType: - """Get details about a machine type. + ) -> SecurityGroup: + """Get security group details. - Get details about a specific machine type. + Get details about a security group of a project. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str - :param machine_type: STACKIT machine type Name. (required) - :type machine_type: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param security_group_id: The identifier (ID) of a STACKIT Security Group. (required) + :type security_group_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -13420,9 +19953,10 @@ def get_machine_type( :return: Returns the result object. """ # noqa: E501 - _param = self._get_machine_type_serialize( + _param = self._get_security_group_serialize( project_id=project_id, - machine_type=machine_type, + region=region, + security_group_id=security_group_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -13430,7 +19964,7 @@ def get_machine_type( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "MachineType", + "200": "SecurityGroup", "400": "Error", "401": "Error", "403": "Error", @@ -13445,13 +19979,22 @@ def get_machine_type( ).data @validate_call - def get_machine_type_with_http_info( + def get_security_group_with_http_info( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - machine_type: Annotated[str, Field(strict=True, max_length=127, description="STACKIT machine type Name.")], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + security_group_id: Annotated[ + str, + Field( + min_length=36, + strict=True, + max_length=36, + description="The identifier (ID) of a STACKIT Security Group.", + ), + ], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -13461,15 +20004,17 @@ def get_machine_type_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[MachineType]: - """Get details about a machine type. + ) -> ApiResponse[SecurityGroup]: + """Get security group details. - Get details about a specific machine type. + Get details about a security group of a project. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str - :param machine_type: STACKIT machine type Name. (required) - :type machine_type: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param security_group_id: The identifier (ID) of a STACKIT Security Group. (required) + :type security_group_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -13492,9 +20037,10 @@ def get_machine_type_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._get_machine_type_serialize( + _param = self._get_security_group_serialize( project_id=project_id, - machine_type=machine_type, + region=region, + security_group_id=security_group_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -13502,7 +20048,7 @@ def get_machine_type_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "MachineType", + "200": "SecurityGroup", "400": "Error", "401": "Error", "403": "Error", @@ -13517,13 +20063,22 @@ def get_machine_type_with_http_info( ) @validate_call - def get_machine_type_without_preload_content( + def get_security_group_without_preload_content( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - machine_type: Annotated[str, Field(strict=True, max_length=127, description="STACKIT machine type Name.")], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + security_group_id: Annotated[ + str, + Field( + min_length=36, + strict=True, + max_length=36, + description="The identifier (ID) of a STACKIT Security Group.", + ), + ], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -13534,14 +20089,16 @@ def get_machine_type_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Get details about a machine type. + """Get security group details. - Get details about a specific machine type. + Get details about a security group of a project. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str - :param machine_type: STACKIT machine type Name. (required) - :type machine_type: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param security_group_id: The identifier (ID) of a STACKIT Security Group. (required) + :type security_group_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -13564,9 +20121,10 @@ def get_machine_type_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._get_machine_type_serialize( + _param = self._get_security_group_serialize( project_id=project_id, - machine_type=machine_type, + region=region, + security_group_id=security_group_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -13574,7 +20132,7 @@ def get_machine_type_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "MachineType", + "200": "SecurityGroup", "400": "Error", "401": "Error", "403": "Error", @@ -13584,10 +20142,11 @@ def get_machine_type_without_preload_content( response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _get_machine_type_serialize( + def _get_security_group_serialize( self, project_id, - machine_type, + region, + security_group_id, _request_auth, _content_type, _headers, @@ -13608,8 +20167,10 @@ def _get_machine_type_serialize( # process the path parameters if project_id is not None: _path_params["projectId"] = project_id - if machine_type is not None: - _path_params["machineType"] = machine_type + if region is not None: + _path_params["region"] = region + if security_group_id is not None: + _path_params["securityGroupId"] = security_group_id # process the query parameters # process the header parameters # process the form parameters @@ -13624,7 +20185,7 @@ def _get_machine_type_serialize( return self.api_client.param_serialize( method="GET", - resource_path="/v1/projects/{projectId}/machine-types/{machineType}", + resource_path="/v2beta1/projects/{projectId}/regions/{region}/security-groups/{securityGroupId}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -13638,15 +20199,30 @@ def _get_machine_type_serialize( ) @validate_call - def get_network( + def get_security_group_rule( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - network_id: Annotated[ + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + security_group_id: Annotated[ str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Network."), + Field( + min_length=36, + strict=True, + max_length=36, + description="The identifier (ID) of a STACKIT Security Group.", + ), + ], + security_group_rule_id: Annotated[ + str, + Field( + min_length=36, + strict=True, + max_length=36, + description="The identifier (ID) of a STACKIT Security Group Rule.", + ), ], _request_timeout: Union[ None, @@ -13657,15 +20233,19 @@ def get_network( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> Network: - """Get network details. + ) -> SecurityGroupRule: + """Get security group rule details. - Get details about a network of a project. + Get details about a security group rule of a project. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str - :param network_id: The identifier (ID) of a STACKIT Network. (required) - :type network_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param security_group_id: The identifier (ID) of a STACKIT Security Group. (required) + :type security_group_id: str + :param security_group_rule_id: The identifier (ID) of a STACKIT Security Group Rule. (required) + :type security_group_rule_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -13688,9 +20268,11 @@ def get_network( :return: Returns the result object. """ # noqa: E501 - _param = self._get_network_serialize( + _param = self._get_security_group_rule_serialize( project_id=project_id, - network_id=network_id, + region=region, + security_group_id=security_group_id, + security_group_rule_id=security_group_rule_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -13698,7 +20280,7 @@ def get_network( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Network", + "200": "SecurityGroupRule", "400": "Error", "401": "Error", "403": "Error", @@ -13713,15 +20295,30 @@ def get_network( ).data @validate_call - def get_network_with_http_info( + def get_security_group_rule_with_http_info( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - network_id: Annotated[ + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + security_group_id: Annotated[ str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Network."), + Field( + min_length=36, + strict=True, + max_length=36, + description="The identifier (ID) of a STACKIT Security Group.", + ), + ], + security_group_rule_id: Annotated[ + str, + Field( + min_length=36, + strict=True, + max_length=36, + description="The identifier (ID) of a STACKIT Security Group Rule.", + ), ], _request_timeout: Union[ None, @@ -13732,15 +20329,19 @@ def get_network_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[Network]: - """Get network details. + ) -> ApiResponse[SecurityGroupRule]: + """Get security group rule details. - Get details about a network of a project. + Get details about a security group rule of a project. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str - :param network_id: The identifier (ID) of a STACKIT Network. (required) - :type network_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param security_group_id: The identifier (ID) of a STACKIT Security Group. (required) + :type security_group_id: str + :param security_group_rule_id: The identifier (ID) of a STACKIT Security Group Rule. (required) + :type security_group_rule_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -13763,9 +20364,11 @@ def get_network_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._get_network_serialize( + _param = self._get_security_group_rule_serialize( project_id=project_id, - network_id=network_id, + region=region, + security_group_id=security_group_id, + security_group_rule_id=security_group_rule_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -13773,7 +20376,7 @@ def get_network_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Network", + "200": "SecurityGroupRule", "400": "Error", "401": "Error", "403": "Error", @@ -13788,15 +20391,30 @@ def get_network_with_http_info( ) @validate_call - def get_network_without_preload_content( + def get_security_group_rule_without_preload_content( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - network_id: Annotated[ + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + security_group_id: Annotated[ str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Network."), + Field( + min_length=36, + strict=True, + max_length=36, + description="The identifier (ID) of a STACKIT Security Group.", + ), + ], + security_group_rule_id: Annotated[ + str, + Field( + min_length=36, + strict=True, + max_length=36, + description="The identifier (ID) of a STACKIT Security Group Rule.", + ), ], _request_timeout: Union[ None, @@ -13808,14 +20426,18 @@ def get_network_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Get network details. + """Get security group rule details. - Get details about a network of a project. + Get details about a security group rule of a project. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str - :param network_id: The identifier (ID) of a STACKIT Network. (required) - :type network_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param security_group_id: The identifier (ID) of a STACKIT Security Group. (required) + :type security_group_id: str + :param security_group_rule_id: The identifier (ID) of a STACKIT Security Group Rule. (required) + :type security_group_rule_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -13838,9 +20460,11 @@ def get_network_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._get_network_serialize( + _param = self._get_security_group_rule_serialize( project_id=project_id, - network_id=network_id, + region=region, + security_group_id=security_group_id, + security_group_rule_id=security_group_rule_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -13848,7 +20472,7 @@ def get_network_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Network", + "200": "SecurityGroupRule", "400": "Error", "401": "Error", "403": "Error", @@ -13858,10 +20482,12 @@ def get_network_without_preload_content( response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _get_network_serialize( + def _get_security_group_rule_serialize( self, project_id, - network_id, + region, + security_group_id, + security_group_rule_id, _request_auth, _content_type, _headers, @@ -13882,8 +20508,12 @@ def _get_network_serialize( # process the path parameters if project_id is not None: _path_params["projectId"] = project_id - if network_id is not None: - _path_params["networkId"] = network_id + if region is not None: + _path_params["region"] = region + if security_group_id is not None: + _path_params["securityGroupId"] = security_group_id + if security_group_rule_id is not None: + _path_params["securityGroupRuleId"] = security_group_rule_id # process the query parameters # process the header parameters # process the form parameters @@ -13898,7 +20528,7 @@ def _get_network_serialize( return self.api_client.param_serialize( method="GET", - resource_path="/v1/projects/{projectId}/networks/{networkId}", + resource_path="/v2beta1/projects/{projectId}/regions/{region}/security-groups/{securityGroupId}/rules/{securityGroupRuleId}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -13912,20 +20542,18 @@ def _get_network_serialize( ) @validate_call - def get_network_area( + def get_server( self, - organization_id: Annotated[ + project_id: Annotated[ str, - Field( - min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Organization." - ), + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - area_id: Annotated[ + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + server_id: Annotated[ str, - Field( - min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Network Area." - ), + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Server."), ], + details: Annotated[Optional[StrictBool], Field(description="Show detailed information about server.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -13935,15 +20563,19 @@ def get_network_area( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> NetworkArea: - """Get details about a network area. + ) -> Server: + """Get server details. - Get details about a network area in an organization. + Get details about a server by its ID. - :param organization_id: The identifier (ID) of a STACKIT Organization. (required) - :type organization_id: str - :param area_id: The identifier (ID) of a STACKIT Network Area. (required) - :type area_id: str + :param project_id: The identifier (ID) of a STACKIT Project. (required) + :type project_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param server_id: The identifier (ID) of a STACKIT Server. (required) + :type server_id: str + :param details: Show detailed information about server. + :type details: bool :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -13966,9 +20598,11 @@ def get_network_area( :return: Returns the result object. """ # noqa: E501 - _param = self._get_network_area_serialize( - organization_id=organization_id, - area_id=area_id, + _param = self._get_server_serialize( + project_id=project_id, + region=region, + server_id=server_id, + details=details, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -13976,7 +20610,7 @@ def get_network_area( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "NetworkArea", + "200": "Server", "400": "Error", "401": "Error", "403": "Error", @@ -13991,20 +20625,18 @@ def get_network_area( ).data @validate_call - def get_network_area_with_http_info( + def get_server_with_http_info( self, - organization_id: Annotated[ + project_id: Annotated[ str, - Field( - min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Organization." - ), + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - area_id: Annotated[ + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + server_id: Annotated[ str, - Field( - min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Network Area." - ), + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Server."), ], + details: Annotated[Optional[StrictBool], Field(description="Show detailed information about server.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -14014,15 +20646,19 @@ def get_network_area_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[NetworkArea]: - """Get details about a network area. + ) -> ApiResponse[Server]: + """Get server details. - Get details about a network area in an organization. + Get details about a server by its ID. - :param organization_id: The identifier (ID) of a STACKIT Organization. (required) - :type organization_id: str - :param area_id: The identifier (ID) of a STACKIT Network Area. (required) - :type area_id: str + :param project_id: The identifier (ID) of a STACKIT Project. (required) + :type project_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param server_id: The identifier (ID) of a STACKIT Server. (required) + :type server_id: str + :param details: Show detailed information about server. + :type details: bool :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -14045,9 +20681,11 @@ def get_network_area_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._get_network_area_serialize( - organization_id=organization_id, - area_id=area_id, + _param = self._get_server_serialize( + project_id=project_id, + region=region, + server_id=server_id, + details=details, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -14055,7 +20693,7 @@ def get_network_area_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "NetworkArea", + "200": "Server", "400": "Error", "401": "Error", "403": "Error", @@ -14070,20 +20708,18 @@ def get_network_area_with_http_info( ) @validate_call - def get_network_area_without_preload_content( + def get_server_without_preload_content( self, - organization_id: Annotated[ + project_id: Annotated[ str, - Field( - min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Organization." - ), + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - area_id: Annotated[ + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + server_id: Annotated[ str, - Field( - min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Network Area." - ), + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Server."), ], + details: Annotated[Optional[StrictBool], Field(description="Show detailed information about server.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -14094,14 +20730,18 @@ def get_network_area_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Get details about a network area. + """Get server details. - Get details about a network area in an organization. + Get details about a server by its ID. - :param organization_id: The identifier (ID) of a STACKIT Organization. (required) - :type organization_id: str - :param area_id: The identifier (ID) of a STACKIT Network Area. (required) - :type area_id: str + :param project_id: The identifier (ID) of a STACKIT Project. (required) + :type project_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param server_id: The identifier (ID) of a STACKIT Server. (required) + :type server_id: str + :param details: Show detailed information about server. + :type details: bool :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -14124,9 +20764,11 @@ def get_network_area_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._get_network_area_serialize( - organization_id=organization_id, - area_id=area_id, + _param = self._get_server_serialize( + project_id=project_id, + region=region, + server_id=server_id, + details=details, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -14134,7 +20776,7 @@ def get_network_area_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "NetworkArea", + "200": "Server", "400": "Error", "401": "Error", "403": "Error", @@ -14144,10 +20786,12 @@ def get_network_area_without_preload_content( response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _get_network_area_serialize( + def _get_server_serialize( self, - organization_id, - area_id, + project_id, + region, + server_id, + details, _request_auth, _content_type, _headers, @@ -14166,11 +20810,17 @@ def _get_network_area_serialize( _body_params: Optional[bytes] = None # process the path parameters - if organization_id is not None: - _path_params["organizationId"] = organization_id - if area_id is not None: - _path_params["areaId"] = area_id + if project_id is not None: + _path_params["projectId"] = project_id + if region is not None: + _path_params["region"] = region + if server_id is not None: + _path_params["serverId"] = server_id # process the query parameters + if details is not None: + + _query_params.append(("details", details)) + # process the header parameters # process the form parameters # process the body parameter @@ -14184,7 +20834,7 @@ def _get_network_area_serialize( return self.api_client.param_serialize( method="GET", - resource_path="/v1/organizations/{organizationId}/network-areas/{areaId}", + resource_path="/v2beta1/projects/{projectId}/regions/{region}/servers/{serverId}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -14198,25 +20848,16 @@ def _get_network_area_serialize( ) @validate_call - def get_network_area_range( + def get_server_console( self, - organization_id: Annotated[ - str, - Field( - min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Organization." - ), - ], - area_id: Annotated[ + project_id: Annotated[ str, - Field( - min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Network Area." - ), + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - network_range_id: Annotated[ + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + server_id: Annotated[ str, - Field( - min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Network Range." - ), + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Server."), ], _request_timeout: Union[ None, @@ -14227,17 +20868,17 @@ def get_network_area_range( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> NetworkRange: - """Get details about a network range. + ) -> ServerConsoleUrl: + """Get server console. - Get details about a network range in a network area. + Get a URL for server remote console. - :param organization_id: The identifier (ID) of a STACKIT Organization. (required) - :type organization_id: str - :param area_id: The identifier (ID) of a STACKIT Network Area. (required) - :type area_id: str - :param network_range_id: The identifier (ID) of a STACKIT Network Range. (required) - :type network_range_id: str + :param project_id: The identifier (ID) of a STACKIT Project. (required) + :type project_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param server_id: The identifier (ID) of a STACKIT Server. (required) + :type server_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -14260,10 +20901,10 @@ def get_network_area_range( :return: Returns the result object. """ # noqa: E501 - _param = self._get_network_area_range_serialize( - organization_id=organization_id, - area_id=area_id, - network_range_id=network_range_id, + _param = self._get_server_console_serialize( + project_id=project_id, + region=region, + server_id=server_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -14271,7 +20912,7 @@ def get_network_area_range( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "NetworkRange", + "200": "ServerConsoleUrl", "400": "Error", "401": "Error", "403": "Error", @@ -14286,25 +20927,16 @@ def get_network_area_range( ).data @validate_call - def get_network_area_range_with_http_info( + def get_server_console_with_http_info( self, - organization_id: Annotated[ - str, - Field( - min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Organization." - ), - ], - area_id: Annotated[ + project_id: Annotated[ str, - Field( - min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Network Area." - ), + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - network_range_id: Annotated[ + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + server_id: Annotated[ str, - Field( - min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Network Range." - ), + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Server."), ], _request_timeout: Union[ None, @@ -14315,17 +20947,17 @@ def get_network_area_range_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[NetworkRange]: - """Get details about a network range. + ) -> ApiResponse[ServerConsoleUrl]: + """Get server console. - Get details about a network range in a network area. + Get a URL for server remote console. - :param organization_id: The identifier (ID) of a STACKIT Organization. (required) - :type organization_id: str - :param area_id: The identifier (ID) of a STACKIT Network Area. (required) - :type area_id: str - :param network_range_id: The identifier (ID) of a STACKIT Network Range. (required) - :type network_range_id: str + :param project_id: The identifier (ID) of a STACKIT Project. (required) + :type project_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param server_id: The identifier (ID) of a STACKIT Server. (required) + :type server_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -14348,10 +20980,10 @@ def get_network_area_range_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._get_network_area_range_serialize( - organization_id=organization_id, - area_id=area_id, - network_range_id=network_range_id, + _param = self._get_server_console_serialize( + project_id=project_id, + region=region, + server_id=server_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -14359,7 +20991,7 @@ def get_network_area_range_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "NetworkRange", + "200": "ServerConsoleUrl", "400": "Error", "401": "Error", "403": "Error", @@ -14374,25 +21006,16 @@ def get_network_area_range_with_http_info( ) @validate_call - def get_network_area_range_without_preload_content( + def get_server_console_without_preload_content( self, - organization_id: Annotated[ - str, - Field( - min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Organization." - ), - ], - area_id: Annotated[ + project_id: Annotated[ str, - Field( - min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Network Area." - ), + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - network_range_id: Annotated[ + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + server_id: Annotated[ str, - Field( - min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Network Range." - ), + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Server."), ], _request_timeout: Union[ None, @@ -14404,16 +21027,16 @@ def get_network_area_range_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Get details about a network range. + """Get server console. - Get details about a network range in a network area. + Get a URL for server remote console. - :param organization_id: The identifier (ID) of a STACKIT Organization. (required) - :type organization_id: str - :param area_id: The identifier (ID) of a STACKIT Network Area. (required) - :type area_id: str - :param network_range_id: The identifier (ID) of a STACKIT Network Range. (required) - :type network_range_id: str + :param project_id: The identifier (ID) of a STACKIT Project. (required) + :type project_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param server_id: The identifier (ID) of a STACKIT Server. (required) + :type server_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -14436,10 +21059,10 @@ def get_network_area_range_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._get_network_area_range_serialize( - organization_id=organization_id, - area_id=area_id, - network_range_id=network_range_id, + _param = self._get_server_console_serialize( + project_id=project_id, + region=region, + server_id=server_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -14447,7 +21070,7 @@ def get_network_area_range_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "NetworkRange", + "200": "ServerConsoleUrl", "400": "Error", "401": "Error", "403": "Error", @@ -14457,11 +21080,11 @@ def get_network_area_range_without_preload_content( response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _get_network_area_range_serialize( + def _get_server_console_serialize( self, - organization_id, - area_id, - network_range_id, + project_id, + region, + server_id, _request_auth, _content_type, _headers, @@ -14480,12 +21103,12 @@ def _get_network_area_range_serialize( _body_params: Optional[bytes] = None # process the path parameters - if organization_id is not None: - _path_params["organizationId"] = organization_id - if area_id is not None: - _path_params["areaId"] = area_id - if network_range_id is not None: - _path_params["networkRangeId"] = network_range_id + if project_id is not None: + _path_params["projectId"] = project_id + if region is not None: + _path_params["region"] = region + if server_id is not None: + _path_params["serverId"] = server_id # process the query parameters # process the header parameters # process the form parameters @@ -14500,7 +21123,7 @@ def _get_network_area_range_serialize( return self.api_client.param_serialize( method="GET", - resource_path="/v1/organizations/{organizationId}/network-areas/{areaId}/network-ranges/{networkRangeId}", + resource_path="/v2beta1/projects/{projectId}/regions/{region}/servers/{serverId}/console", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -14514,23 +21137,23 @@ def _get_network_area_range_serialize( ) @validate_call - def get_network_area_route( + def get_server_log( self, - organization_id: Annotated[ + project_id: Annotated[ str, - Field( - min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Organization." - ), + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - area_id: Annotated[ + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + server_id: Annotated[ str, + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Server."), + ], + length: Annotated[ + Optional[Annotated[int, Field(strict=True, ge=0)]], Field( - min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Network Area." + description="Request the server log. By default the length is limited to 2000 lines. Set to 0 to retrieve the complete log." ), - ], - route_id: Annotated[ - str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Route.") - ], + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -14540,17 +21163,19 @@ def get_network_area_route( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> Route: - """Get details about a network route. + ) -> GetServerLog200Response: + """Get server log. - Get details about a network route defined in a network area. + Get server console log. - :param organization_id: The identifier (ID) of a STACKIT Organization. (required) - :type organization_id: str - :param area_id: The identifier (ID) of a STACKIT Network Area. (required) - :type area_id: str - :param route_id: The identifier (ID) of a STACKIT Route. (required) - :type route_id: str + :param project_id: The identifier (ID) of a STACKIT Project. (required) + :type project_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param server_id: The identifier (ID) of a STACKIT Server. (required) + :type server_id: str + :param length: Request the server log. By default the length is limited to 2000 lines. Set to 0 to retrieve the complete log. + :type length: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -14573,10 +21198,11 @@ def get_network_area_route( :return: Returns the result object. """ # noqa: E501 - _param = self._get_network_area_route_serialize( - organization_id=organization_id, - area_id=area_id, - route_id=route_id, + _param = self._get_server_log_serialize( + project_id=project_id, + region=region, + server_id=server_id, + length=length, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -14584,7 +21210,7 @@ def get_network_area_route( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Route", + "200": "GetServerLog200Response", "400": "Error", "401": "Error", "403": "Error", @@ -14599,23 +21225,23 @@ def get_network_area_route( ).data @validate_call - def get_network_area_route_with_http_info( + def get_server_log_with_http_info( self, - organization_id: Annotated[ + project_id: Annotated[ str, - Field( - min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Organization." - ), + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - area_id: Annotated[ + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + server_id: Annotated[ str, + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Server."), + ], + length: Annotated[ + Optional[Annotated[int, Field(strict=True, ge=0)]], Field( - min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Network Area." + description="Request the server log. By default the length is limited to 2000 lines. Set to 0 to retrieve the complete log." ), - ], - route_id: Annotated[ - str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Route.") - ], + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -14625,17 +21251,19 @@ def get_network_area_route_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[Route]: - """Get details about a network route. + ) -> ApiResponse[GetServerLog200Response]: + """Get server log. - Get details about a network route defined in a network area. + Get server console log. - :param organization_id: The identifier (ID) of a STACKIT Organization. (required) - :type organization_id: str - :param area_id: The identifier (ID) of a STACKIT Network Area. (required) - :type area_id: str - :param route_id: The identifier (ID) of a STACKIT Route. (required) - :type route_id: str + :param project_id: The identifier (ID) of a STACKIT Project. (required) + :type project_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param server_id: The identifier (ID) of a STACKIT Server. (required) + :type server_id: str + :param length: Request the server log. By default the length is limited to 2000 lines. Set to 0 to retrieve the complete log. + :type length: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -14658,10 +21286,11 @@ def get_network_area_route_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._get_network_area_route_serialize( - organization_id=organization_id, - area_id=area_id, - route_id=route_id, + _param = self._get_server_log_serialize( + project_id=project_id, + region=region, + server_id=server_id, + length=length, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -14669,7 +21298,7 @@ def get_network_area_route_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Route", + "200": "GetServerLog200Response", "400": "Error", "401": "Error", "403": "Error", @@ -14684,23 +21313,23 @@ def get_network_area_route_with_http_info( ) @validate_call - def get_network_area_route_without_preload_content( + def get_server_log_without_preload_content( self, - organization_id: Annotated[ + project_id: Annotated[ str, - Field( - min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Organization." - ), + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - area_id: Annotated[ + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + server_id: Annotated[ str, + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Server."), + ], + length: Annotated[ + Optional[Annotated[int, Field(strict=True, ge=0)]], Field( - min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Network Area." + description="Request the server log. By default the length is limited to 2000 lines. Set to 0 to retrieve the complete log." ), - ], - route_id: Annotated[ - str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Route.") - ], + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -14711,16 +21340,18 @@ def get_network_area_route_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Get details about a network route. + """Get server log. - Get details about a network route defined in a network area. + Get server console log. - :param organization_id: The identifier (ID) of a STACKIT Organization. (required) - :type organization_id: str - :param area_id: The identifier (ID) of a STACKIT Network Area. (required) - :type area_id: str - :param route_id: The identifier (ID) of a STACKIT Route. (required) - :type route_id: str + :param project_id: The identifier (ID) of a STACKIT Project. (required) + :type project_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param server_id: The identifier (ID) of a STACKIT Server. (required) + :type server_id: str + :param length: Request the server log. By default the length is limited to 2000 lines. Set to 0 to retrieve the complete log. + :type length: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -14743,10 +21374,11 @@ def get_network_area_route_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._get_network_area_route_serialize( - organization_id=organization_id, - area_id=area_id, - route_id=route_id, + _param = self._get_server_log_serialize( + project_id=project_id, + region=region, + server_id=server_id, + length=length, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -14754,7 +21386,7 @@ def get_network_area_route_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Route", + "200": "GetServerLog200Response", "400": "Error", "401": "Error", "403": "Error", @@ -14764,11 +21396,12 @@ def get_network_area_route_without_preload_content( response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _get_network_area_route_serialize( + def _get_server_log_serialize( self, - organization_id, - area_id, - route_id, + project_id, + region, + server_id, + length, _request_auth, _content_type, _headers, @@ -14787,13 +21420,17 @@ def _get_network_area_route_serialize( _body_params: Optional[bytes] = None # process the path parameters - if organization_id is not None: - _path_params["organizationId"] = organization_id - if area_id is not None: - _path_params["areaId"] = area_id - if route_id is not None: - _path_params["routeId"] = route_id + if project_id is not None: + _path_params["projectId"] = project_id + if region is not None: + _path_params["region"] = region + if server_id is not None: + _path_params["serverId"] = server_id # process the query parameters + if length is not None: + + _query_params.append(("length", length)) + # process the header parameters # process the form parameters # process the body parameter @@ -14807,7 +21444,7 @@ def _get_network_area_route_serialize( return self.api_client.param_serialize( method="GET", - resource_path="/v1/organizations/{organizationId}/network-areas/{areaId}/routes/{routeId}", + resource_path="/v2beta1/projects/{projectId}/regions/{region}/servers/{serverId}/log", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -14821,19 +21458,16 @@ def _get_network_area_route_serialize( ) @validate_call - def get_nic( + def get_volume( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - network_id: Annotated[ - str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Network."), - ], - nic_id: Annotated[ + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + volume_id: Annotated[ str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a network interface."), + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Volume."), ], _request_timeout: Union[ None, @@ -14844,17 +21478,17 @@ def get_nic( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> NIC: - """Get details about a network interface of a network. + ) -> Volume: + """Get details about a volume. - Get details about a network interface inside a network. + Get details about a block device volume. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str - :param network_id: The identifier (ID) of a STACKIT Network. (required) - :type network_id: str - :param nic_id: The identifier (ID) of a network interface. (required) - :type nic_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param volume_id: The identifier (ID) of a STACKIT Volume. (required) + :type volume_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -14877,10 +21511,10 @@ def get_nic( :return: Returns the result object. """ # noqa: E501 - _param = self._get_nic_serialize( + _param = self._get_volume_serialize( project_id=project_id, - network_id=network_id, - nic_id=nic_id, + region=region, + volume_id=volume_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -14888,7 +21522,7 @@ def get_nic( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "NIC", + "200": "Volume", "400": "Error", "401": "Error", "403": "Error", @@ -14903,19 +21537,16 @@ def get_nic( ).data @validate_call - def get_nic_with_http_info( + def get_volume_with_http_info( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - network_id: Annotated[ - str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Network."), - ], - nic_id: Annotated[ + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + volume_id: Annotated[ str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a network interface."), + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Volume."), ], _request_timeout: Union[ None, @@ -14926,17 +21557,17 @@ def get_nic_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[NIC]: - """Get details about a network interface of a network. + ) -> ApiResponse[Volume]: + """Get details about a volume. - Get details about a network interface inside a network. + Get details about a block device volume. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str - :param network_id: The identifier (ID) of a STACKIT Network. (required) - :type network_id: str - :param nic_id: The identifier (ID) of a network interface. (required) - :type nic_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param volume_id: The identifier (ID) of a STACKIT Volume. (required) + :type volume_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -14959,10 +21590,10 @@ def get_nic_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._get_nic_serialize( + _param = self._get_volume_serialize( project_id=project_id, - network_id=network_id, - nic_id=nic_id, + region=region, + volume_id=volume_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -14970,7 +21601,7 @@ def get_nic_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "NIC", + "200": "Volume", "400": "Error", "401": "Error", "403": "Error", @@ -14985,19 +21616,16 @@ def get_nic_with_http_info( ) @validate_call - def get_nic_without_preload_content( + def get_volume_without_preload_content( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - network_id: Annotated[ - str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Network."), - ], - nic_id: Annotated[ + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + volume_id: Annotated[ str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a network interface."), + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Volume."), ], _request_timeout: Union[ None, @@ -15009,16 +21637,16 @@ def get_nic_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Get details about a network interface of a network. + """Get details about a volume. - Get details about a network interface inside a network. + Get details about a block device volume. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str - :param network_id: The identifier (ID) of a STACKIT Network. (required) - :type network_id: str - :param nic_id: The identifier (ID) of a network interface. (required) - :type nic_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param volume_id: The identifier (ID) of a STACKIT Volume. (required) + :type volume_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -15041,10 +21669,10 @@ def get_nic_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._get_nic_serialize( + _param = self._get_volume_serialize( project_id=project_id, - network_id=network_id, - nic_id=nic_id, + region=region, + volume_id=volume_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -15052,7 +21680,7 @@ def get_nic_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "NIC", + "200": "Volume", "400": "Error", "401": "Error", "403": "Error", @@ -15062,11 +21690,11 @@ def get_nic_without_preload_content( response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _get_nic_serialize( + def _get_volume_serialize( self, project_id, - network_id, - nic_id, + region, + volume_id, _request_auth, _content_type, _headers, @@ -15087,10 +21715,10 @@ def _get_nic_serialize( # process the path parameters if project_id is not None: _path_params["projectId"] = project_id - if network_id is not None: - _path_params["networkId"] = network_id - if nic_id is not None: - _path_params["nicId"] = nic_id + if region is not None: + _path_params["region"] = region + if volume_id is not None: + _path_params["volumeId"] = volume_id # process the query parameters # process the header parameters # process the form parameters @@ -15105,7 +21733,7 @@ def _get_nic_serialize( return self.api_client.param_serialize( method="GET", - resource_path="/v1/projects/{projectId}/networks/{networkId}/nics/{nicId}", + resource_path="/v2beta1/projects/{projectId}/regions/{region}/volumes/{volumeId}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -15119,17 +21747,15 @@ def _get_nic_serialize( ) @validate_call - def get_organization_request( + def get_volume_performance_class( self, - organization_id: Annotated[ + project_id: Annotated[ str, - Field( - min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Organization." - ), + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - request_id: Annotated[ - str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Request."), + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + volume_performance_class: Annotated[ + str, Field(strict=True, max_length=127, description="The name of a STACKIT Volume performance class.") ], _request_timeout: Union[ None, @@ -15140,15 +21766,17 @@ def get_organization_request( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> Request: - """Lookup an organization request ID. + ) -> VolumePerformanceClass: + """Get details about a volume performance class. - Lookup an organization request ID from a previous request. This allows to find resource IDs of resources generated during a organization request. + Get details about a specific volume performance class. - :param organization_id: The identifier (ID) of a STACKIT Organization. (required) - :type organization_id: str - :param request_id: The identifier (ID) of a STACKIT Request. (required) - :type request_id: str + :param project_id: The identifier (ID) of a STACKIT Project. (required) + :type project_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param volume_performance_class: The name of a STACKIT Volume performance class. (required) + :type volume_performance_class: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -15171,9 +21799,10 @@ def get_organization_request( :return: Returns the result object. """ # noqa: E501 - _param = self._get_organization_request_serialize( - organization_id=organization_id, - request_id=request_id, + _param = self._get_volume_performance_class_serialize( + project_id=project_id, + region=region, + volume_performance_class=volume_performance_class, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -15181,7 +21810,7 @@ def get_organization_request( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Request", + "200": "VolumePerformanceClass", "400": "Error", "401": "Error", "403": "Error", @@ -15196,17 +21825,15 @@ def get_organization_request( ).data @validate_call - def get_organization_request_with_http_info( + def get_volume_performance_class_with_http_info( self, - organization_id: Annotated[ + project_id: Annotated[ str, - Field( - min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Organization." - ), + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - request_id: Annotated[ - str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Request."), + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + volume_performance_class: Annotated[ + str, Field(strict=True, max_length=127, description="The name of a STACKIT Volume performance class.") ], _request_timeout: Union[ None, @@ -15217,15 +21844,17 @@ def get_organization_request_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[Request]: - """Lookup an organization request ID. + ) -> ApiResponse[VolumePerformanceClass]: + """Get details about a volume performance class. - Lookup an organization request ID from a previous request. This allows to find resource IDs of resources generated during a organization request. + Get details about a specific volume performance class. - :param organization_id: The identifier (ID) of a STACKIT Organization. (required) - :type organization_id: str - :param request_id: The identifier (ID) of a STACKIT Request. (required) - :type request_id: str + :param project_id: The identifier (ID) of a STACKIT Project. (required) + :type project_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param volume_performance_class: The name of a STACKIT Volume performance class. (required) + :type volume_performance_class: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -15248,9 +21877,10 @@ def get_organization_request_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._get_organization_request_serialize( - organization_id=organization_id, - request_id=request_id, + _param = self._get_volume_performance_class_serialize( + project_id=project_id, + region=region, + volume_performance_class=volume_performance_class, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -15258,7 +21888,7 @@ def get_organization_request_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Request", + "200": "VolumePerformanceClass", "400": "Error", "401": "Error", "403": "Error", @@ -15273,17 +21903,15 @@ def get_organization_request_with_http_info( ) @validate_call - def get_organization_request_without_preload_content( + def get_volume_performance_class_without_preload_content( self, - organization_id: Annotated[ + project_id: Annotated[ str, - Field( - min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Organization." - ), + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - request_id: Annotated[ - str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Request."), + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + volume_performance_class: Annotated[ + str, Field(strict=True, max_length=127, description="The name of a STACKIT Volume performance class.") ], _request_timeout: Union[ None, @@ -15295,14 +21923,16 @@ def get_organization_request_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Lookup an organization request ID. + """Get details about a volume performance class. - Lookup an organization request ID from a previous request. This allows to find resource IDs of resources generated during a organization request. + Get details about a specific volume performance class. - :param organization_id: The identifier (ID) of a STACKIT Organization. (required) - :type organization_id: str - :param request_id: The identifier (ID) of a STACKIT Request. (required) - :type request_id: str + :param project_id: The identifier (ID) of a STACKIT Project. (required) + :type project_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param volume_performance_class: The name of a STACKIT Volume performance class. (required) + :type volume_performance_class: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -15325,9 +21955,10 @@ def get_organization_request_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._get_organization_request_serialize( - organization_id=organization_id, - request_id=request_id, + _param = self._get_volume_performance_class_serialize( + project_id=project_id, + region=region, + volume_performance_class=volume_performance_class, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -15335,7 +21966,7 @@ def get_organization_request_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Request", + "200": "VolumePerformanceClass", "400": "Error", "401": "Error", "403": "Error", @@ -15345,10 +21976,11 @@ def get_organization_request_without_preload_content( response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _get_organization_request_serialize( + def _get_volume_performance_class_serialize( self, - organization_id, - request_id, + project_id, + region, + volume_performance_class, _request_auth, _content_type, _headers, @@ -15367,10 +21999,12 @@ def _get_organization_request_serialize( _body_params: Optional[bytes] = None # process the path parameters - if organization_id is not None: - _path_params["organizationId"] = organization_id - if request_id is not None: - _path_params["requestId"] = request_id + if project_id is not None: + _path_params["projectId"] = project_id + if region is not None: + _path_params["region"] = region + if volume_performance_class is not None: + _path_params["volumePerformanceClass"] = volume_performance_class # process the query parameters # process the header parameters # process the form parameters @@ -15385,7 +22019,7 @@ def _get_organization_request_serialize( return self.api_client.param_serialize( method="GET", - resource_path="/v1/organizations/{organizationId}/requests/{requestId}", + resource_path="/v2beta1/projects/{projectId}/regions/{region}/volume-performance-classes/{volumePerformanceClass}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -15399,12 +22033,13 @@ def _get_organization_request_serialize( ) @validate_call - def get_project_details( + def list_affinity_groups( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -15414,13 +22049,15 @@ def get_project_details( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> Project: - """Get project details. + ) -> AffinityGroupListResponse: + """Get the affinity groups setup for a project. - Get details about a STACKIT project. + Get the affinity groups created in a project. Affinity groups are an indication of locality of a server relative to another group of servers. They can be either running on the same host (affinity) or on different ones (anti-affinity). :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -15443,8 +22080,9 @@ def get_project_details( :return: Returns the result object. """ # noqa: E501 - _param = self._get_project_details_serialize( + _param = self._list_affinity_groups_serialize( project_id=project_id, + region=region, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -15452,11 +22090,12 @@ def get_project_details( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Project", + "200": "AffinityGroupListResponse", "400": "Error", "401": "Error", "403": "Error", "404": "Error", + "409": "Error", "500": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -15467,12 +22106,13 @@ def get_project_details( ).data @validate_call - def get_project_details_with_http_info( + def list_affinity_groups_with_http_info( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -15482,13 +22122,15 @@ def get_project_details_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[Project]: - """Get project details. + ) -> ApiResponse[AffinityGroupListResponse]: + """Get the affinity groups setup for a project. - Get details about a STACKIT project. + Get the affinity groups created in a project. Affinity groups are an indication of locality of a server relative to another group of servers. They can be either running on the same host (affinity) or on different ones (anti-affinity). :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -15511,8 +22153,9 @@ def get_project_details_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._get_project_details_serialize( + _param = self._list_affinity_groups_serialize( project_id=project_id, + region=region, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -15520,11 +22163,12 @@ def get_project_details_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Project", + "200": "AffinityGroupListResponse", "400": "Error", "401": "Error", "403": "Error", "404": "Error", + "409": "Error", "500": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -15535,12 +22179,13 @@ def get_project_details_with_http_info( ) @validate_call - def get_project_details_without_preload_content( + def list_affinity_groups_without_preload_content( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -15551,12 +22196,14 @@ def get_project_details_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Get project details. + """Get the affinity groups setup for a project. - Get details about a STACKIT project. + Get the affinity groups created in a project. Affinity groups are an indication of locality of a server relative to another group of servers. They can be either running on the same host (affinity) or on different ones (anti-affinity). :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -15579,8 +22226,9 @@ def get_project_details_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._get_project_details_serialize( + _param = self._list_affinity_groups_serialize( project_id=project_id, + region=region, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -15588,19 +22236,21 @@ def get_project_details_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Project", + "200": "AffinityGroupListResponse", "400": "Error", "401": "Error", "403": "Error", "404": "Error", + "409": "Error", "500": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _get_project_details_serialize( + def _list_affinity_groups_serialize( self, project_id, + region, _request_auth, _content_type, _headers, @@ -15621,6 +22271,8 @@ def _get_project_details_serialize( # process the path parameters if project_id is not None: _path_params["projectId"] = project_id + if region is not None: + _path_params["region"] = region # process the query parameters # process the header parameters # process the form parameters @@ -15635,7 +22287,7 @@ def _get_project_details_serialize( return self.api_client.param_serialize( method="GET", - resource_path="/v1/projects/{projectId}", + resource_path="/v2beta1/projects/{projectId}/regions/{region}/affinity-groups", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -15649,15 +22301,16 @@ def _get_project_details_serialize( ) @validate_call - def get_project_nic( + def list_attached_volumes( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - nic_id: Annotated[ + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + server_id: Annotated[ str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a network interface."), + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Server."), ], _request_timeout: Union[ None, @@ -15668,15 +22321,17 @@ def get_project_nic( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> NIC: - """Get details about a network interface of a project. + ) -> VolumeAttachmentListResponse: + """List all volume attachments of a server. - Get details about a network interface inside a project. + Get a list of all volume attachments of a server. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str - :param nic_id: The identifier (ID) of a network interface. (required) - :type nic_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param server_id: The identifier (ID) of a STACKIT Server. (required) + :type server_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -15699,9 +22354,10 @@ def get_project_nic( :return: Returns the result object. """ # noqa: E501 - _param = self._get_project_nic_serialize( + _param = self._list_attached_volumes_serialize( project_id=project_id, - nic_id=nic_id, + region=region, + server_id=server_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -15709,7 +22365,7 @@ def get_project_nic( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "NIC", + "200": "VolumeAttachmentListResponse", "400": "Error", "401": "Error", "403": "Error", @@ -15724,15 +22380,16 @@ def get_project_nic( ).data @validate_call - def get_project_nic_with_http_info( + def list_attached_volumes_with_http_info( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - nic_id: Annotated[ + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + server_id: Annotated[ str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a network interface."), + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Server."), ], _request_timeout: Union[ None, @@ -15743,15 +22400,17 @@ def get_project_nic_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[NIC]: - """Get details about a network interface of a project. + ) -> ApiResponse[VolumeAttachmentListResponse]: + """List all volume attachments of a server. - Get details about a network interface inside a project. + Get a list of all volume attachments of a server. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str - :param nic_id: The identifier (ID) of a network interface. (required) - :type nic_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param server_id: The identifier (ID) of a STACKIT Server. (required) + :type server_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -15774,9 +22433,10 @@ def get_project_nic_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._get_project_nic_serialize( + _param = self._list_attached_volumes_serialize( project_id=project_id, - nic_id=nic_id, + region=region, + server_id=server_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -15784,7 +22444,7 @@ def get_project_nic_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "NIC", + "200": "VolumeAttachmentListResponse", "400": "Error", "401": "Error", "403": "Error", @@ -15799,15 +22459,16 @@ def get_project_nic_with_http_info( ) @validate_call - def get_project_nic_without_preload_content( + def list_attached_volumes_without_preload_content( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - nic_id: Annotated[ + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + server_id: Annotated[ str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a network interface."), + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Server."), ], _request_timeout: Union[ None, @@ -15819,14 +22480,16 @@ def get_project_nic_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Get details about a network interface of a project. + """List all volume attachments of a server. - Get details about a network interface inside a project. + Get a list of all volume attachments of a server. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str - :param nic_id: The identifier (ID) of a network interface. (required) - :type nic_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param server_id: The identifier (ID) of a STACKIT Server. (required) + :type server_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -15849,9 +22512,10 @@ def get_project_nic_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._get_project_nic_serialize( + _param = self._list_attached_volumes_serialize( project_id=project_id, - nic_id=nic_id, + region=region, + server_id=server_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -15859,7 +22523,7 @@ def get_project_nic_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "NIC", + "200": "VolumeAttachmentListResponse", "400": "Error", "401": "Error", "403": "Error", @@ -15869,10 +22533,11 @@ def get_project_nic_without_preload_content( response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _get_project_nic_serialize( + def _list_attached_volumes_serialize( self, project_id, - nic_id, + region, + server_id, _request_auth, _content_type, _headers, @@ -15893,8 +22558,10 @@ def _get_project_nic_serialize( # process the path parameters if project_id is not None: _path_params["projectId"] = project_id - if nic_id is not None: - _path_params["nicId"] = nic_id + if region is not None: + _path_params["region"] = region + if server_id is not None: + _path_params["serverId"] = server_id # process the query parameters # process the header parameters # process the form parameters @@ -15909,7 +22576,7 @@ def _get_project_nic_serialize( return self.api_client.param_serialize( method="GET", - resource_path="/v1/projects/{projectId}/nics/{nicId}", + resource_path="/v2beta1/projects/{projectId}/regions/{region}/servers/{serverId}/volume-attachments", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -15923,16 +22590,9 @@ def _get_project_nic_serialize( ) @validate_call - def get_project_request( + def list_availability_zones( self, - project_id: Annotated[ - str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), - ], - request_id: Annotated[ - str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Request."), - ], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -15942,15 +22602,13 @@ def get_project_request( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> Request: - """Lookup a project request ID. + ) -> AvailabilityZoneListResponse: + """List all availability zones. - Lookup a project request ID from a previous request. This allows to find resource IDs of resources generated during a projects request. + Get a list of all availability zones. - :param project_id: The identifier (ID) of a STACKIT Project. (required) - :type project_id: str - :param request_id: The identifier (ID) of a STACKIT Request. (required) - :type request_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -15973,9 +22631,8 @@ def get_project_request( :return: Returns the result object. """ # noqa: E501 - _param = self._get_project_request_serialize( - project_id=project_id, - request_id=request_id, + _param = self._list_availability_zones_serialize( + region=region, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -15983,7 +22640,7 @@ def get_project_request( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Request", + "200": "AvailabilityZoneListResponse", "400": "Error", "401": "Error", "403": "Error", @@ -15998,16 +22655,9 @@ def get_project_request( ).data @validate_call - def get_project_request_with_http_info( + def list_availability_zones_with_http_info( self, - project_id: Annotated[ - str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), - ], - request_id: Annotated[ - str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Request."), - ], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -16017,15 +22667,13 @@ def get_project_request_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[Request]: - """Lookup a project request ID. + ) -> ApiResponse[AvailabilityZoneListResponse]: + """List all availability zones. - Lookup a project request ID from a previous request. This allows to find resource IDs of resources generated during a projects request. + Get a list of all availability zones. - :param project_id: The identifier (ID) of a STACKIT Project. (required) - :type project_id: str - :param request_id: The identifier (ID) of a STACKIT Request. (required) - :type request_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -16048,9 +22696,8 @@ def get_project_request_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._get_project_request_serialize( - project_id=project_id, - request_id=request_id, + _param = self._list_availability_zones_serialize( + region=region, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -16058,7 +22705,7 @@ def get_project_request_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Request", + "200": "AvailabilityZoneListResponse", "400": "Error", "401": "Error", "403": "Error", @@ -16073,16 +22720,9 @@ def get_project_request_with_http_info( ) @validate_call - def get_project_request_without_preload_content( + def list_availability_zones_without_preload_content( self, - project_id: Annotated[ - str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), - ], - request_id: Annotated[ - str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Request."), - ], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -16093,14 +22733,12 @@ def get_project_request_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Lookup a project request ID. + """List all availability zones. - Lookup a project request ID from a previous request. This allows to find resource IDs of resources generated during a projects request. + Get a list of all availability zones. - :param project_id: The identifier (ID) of a STACKIT Project. (required) - :type project_id: str - :param request_id: The identifier (ID) of a STACKIT Request. (required) - :type request_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -16123,9 +22761,8 @@ def get_project_request_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._get_project_request_serialize( - project_id=project_id, - request_id=request_id, + _param = self._list_availability_zones_serialize( + region=region, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -16133,7 +22770,7 @@ def get_project_request_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Request", + "200": "AvailabilityZoneListResponse", "400": "Error", "401": "Error", "403": "Error", @@ -16143,10 +22780,9 @@ def get_project_request_without_preload_content( response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _get_project_request_serialize( + def _list_availability_zones_serialize( self, - project_id, - request_id, + region, _request_auth, _content_type, _headers, @@ -16165,10 +22801,8 @@ def _get_project_request_serialize( _body_params: Optional[bytes] = None # process the path parameters - if project_id is not None: - _path_params["projectId"] = project_id - if request_id is not None: - _path_params["requestId"] = request_id + if region is not None: + _path_params["region"] = region # process the query parameters # process the header parameters # process the form parameters @@ -16183,7 +22817,7 @@ def _get_project_request_serialize( return self.api_client.param_serialize( method="GET", - resource_path="/v1/projects/{projectId}/requests/{requestId}", + resource_path="/v2beta1/regions/{region}/availability-zones", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -16197,15 +22831,14 @@ def _get_project_request_serialize( ) @validate_call - def get_public_ip( + def list_backups( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - public_ip_id: Annotated[ - str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a Public IP.") - ], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + label_selector: Annotated[Optional[StrictStr], Field(description="Filter resources by labels.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -16215,15 +22848,17 @@ def get_public_ip( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> PublicIp: - """Get details about a public IP. + ) -> BackupListResponse: + """List all backups inside a project. - Get details about a public IP inside a project. + Get a list of all backups inside a project. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str - :param public_ip_id: The identifier (ID) of a Public IP. (required) - :type public_ip_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param label_selector: Filter resources by labels. + :type label_selector: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -16246,9 +22881,10 @@ def get_public_ip( :return: Returns the result object. """ # noqa: E501 - _param = self._get_public_ip_serialize( + _param = self._list_backups_serialize( project_id=project_id, - public_ip_id=public_ip_id, + region=region, + label_selector=label_selector, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -16256,7 +22892,7 @@ def get_public_ip( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "PublicIp", + "200": "BackupListResponse", "400": "Error", "401": "Error", "403": "Error", @@ -16271,15 +22907,14 @@ def get_public_ip( ).data @validate_call - def get_public_ip_with_http_info( + def list_backups_with_http_info( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - public_ip_id: Annotated[ - str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a Public IP.") - ], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + label_selector: Annotated[Optional[StrictStr], Field(description="Filter resources by labels.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -16289,15 +22924,17 @@ def get_public_ip_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[PublicIp]: - """Get details about a public IP. + ) -> ApiResponse[BackupListResponse]: + """List all backups inside a project. - Get details about a public IP inside a project. + Get a list of all backups inside a project. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str - :param public_ip_id: The identifier (ID) of a Public IP. (required) - :type public_ip_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param label_selector: Filter resources by labels. + :type label_selector: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -16320,9 +22957,10 @@ def get_public_ip_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._get_public_ip_serialize( + _param = self._list_backups_serialize( project_id=project_id, - public_ip_id=public_ip_id, + region=region, + label_selector=label_selector, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -16330,7 +22968,7 @@ def get_public_ip_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "PublicIp", + "200": "BackupListResponse", "400": "Error", "401": "Error", "403": "Error", @@ -16345,15 +22983,14 @@ def get_public_ip_with_http_info( ) @validate_call - def get_public_ip_without_preload_content( + def list_backups_without_preload_content( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - public_ip_id: Annotated[ - str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a Public IP.") - ], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + label_selector: Annotated[Optional[StrictStr], Field(description="Filter resources by labels.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -16364,14 +23001,16 @@ def get_public_ip_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Get details about a public IP. + """List all backups inside a project. - Get details about a public IP inside a project. + Get a list of all backups inside a project. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str - :param public_ip_id: The identifier (ID) of a Public IP. (required) - :type public_ip_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param label_selector: Filter resources by labels. + :type label_selector: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -16394,9 +23033,10 @@ def get_public_ip_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._get_public_ip_serialize( + _param = self._list_backups_serialize( project_id=project_id, - public_ip_id=public_ip_id, + region=region, + label_selector=label_selector, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -16404,7 +23044,7 @@ def get_public_ip_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "PublicIp", + "200": "BackupListResponse", "400": "Error", "401": "Error", "403": "Error", @@ -16414,10 +23054,11 @@ def get_public_ip_without_preload_content( response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _get_public_ip_serialize( + def _list_backups_serialize( self, project_id, - public_ip_id, + region, + label_selector, _request_auth, _content_type, _headers, @@ -16438,9 +23079,13 @@ def _get_public_ip_serialize( # process the path parameters if project_id is not None: _path_params["projectId"] = project_id - if public_ip_id is not None: - _path_params["publicIpId"] = public_ip_id + if region is not None: + _path_params["region"] = region # process the query parameters + if label_selector is not None: + + _query_params.append(("label_selector", label_selector)) + # process the header parameters # process the form parameters # process the body parameter @@ -16454,7 +23099,7 @@ def _get_public_ip_serialize( return self.api_client.param_serialize( method="GET", - resource_path="/v1/projects/{projectId}/public-ips/{publicIpId}", + resource_path="/v2beta1/projects/{projectId}/regions/{region}/backups", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -16468,21 +23113,15 @@ def _get_public_ip_serialize( ) @validate_call - def get_security_group( + def list_images( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - security_group_id: Annotated[ - str, - Field( - min_length=36, - strict=True, - max_length=36, - description="The identifier (ID) of a STACKIT Security Group.", - ), - ], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + all: Annotated[Optional[StrictBool], Field(description="List all Images.")] = None, + label_selector: Annotated[Optional[StrictStr], Field(description="Filter resources by labels.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -16492,15 +23131,19 @@ def get_security_group( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> SecurityGroup: - """Get security group details. + ) -> ImageListResponse: + """List all Images inside a project. - Get details about a security group of a project. + Get a list of all images inside a project. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str - :param security_group_id: The identifier (ID) of a STACKIT Security Group. (required) - :type security_group_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param all: List all Images. + :type all: bool + :param label_selector: Filter resources by labels. + :type label_selector: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -16523,9 +23166,11 @@ def get_security_group( :return: Returns the result object. """ # noqa: E501 - _param = self._get_security_group_serialize( + _param = self._list_images_serialize( project_id=project_id, - security_group_id=security_group_id, + region=region, + all=all, + label_selector=label_selector, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -16533,7 +23178,7 @@ def get_security_group( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "SecurityGroup", + "200": "ImageListResponse", "400": "Error", "401": "Error", "403": "Error", @@ -16548,21 +23193,15 @@ def get_security_group( ).data @validate_call - def get_security_group_with_http_info( + def list_images_with_http_info( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - security_group_id: Annotated[ - str, - Field( - min_length=36, - strict=True, - max_length=36, - description="The identifier (ID) of a STACKIT Security Group.", - ), - ], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + all: Annotated[Optional[StrictBool], Field(description="List all Images.")] = None, + label_selector: Annotated[Optional[StrictStr], Field(description="Filter resources by labels.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -16572,15 +23211,19 @@ def get_security_group_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[SecurityGroup]: - """Get security group details. + ) -> ApiResponse[ImageListResponse]: + """List all Images inside a project. - Get details about a security group of a project. + Get a list of all images inside a project. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str - :param security_group_id: The identifier (ID) of a STACKIT Security Group. (required) - :type security_group_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param all: List all Images. + :type all: bool + :param label_selector: Filter resources by labels. + :type label_selector: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -16603,9 +23246,11 @@ def get_security_group_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._get_security_group_serialize( + _param = self._list_images_serialize( project_id=project_id, - security_group_id=security_group_id, + region=region, + all=all, + label_selector=label_selector, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -16613,7 +23258,7 @@ def get_security_group_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "SecurityGroup", + "200": "ImageListResponse", "400": "Error", "401": "Error", "403": "Error", @@ -16628,21 +23273,15 @@ def get_security_group_with_http_info( ) @validate_call - def get_security_group_without_preload_content( + def list_images_without_preload_content( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - security_group_id: Annotated[ - str, - Field( - min_length=36, - strict=True, - max_length=36, - description="The identifier (ID) of a STACKIT Security Group.", - ), - ], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + all: Annotated[Optional[StrictBool], Field(description="List all Images.")] = None, + label_selector: Annotated[Optional[StrictStr], Field(description="Filter resources by labels.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -16653,14 +23292,18 @@ def get_security_group_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Get security group details. + """List all Images inside a project. - Get details about a security group of a project. + Get a list of all images inside a project. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str - :param security_group_id: The identifier (ID) of a STACKIT Security Group. (required) - :type security_group_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param all: List all Images. + :type all: bool + :param label_selector: Filter resources by labels. + :type label_selector: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -16683,9 +23326,11 @@ def get_security_group_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._get_security_group_serialize( + _param = self._list_images_serialize( project_id=project_id, - security_group_id=security_group_id, + region=region, + all=all, + label_selector=label_selector, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -16693,7 +23338,7 @@ def get_security_group_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "SecurityGroup", + "200": "ImageListResponse", "400": "Error", "401": "Error", "403": "Error", @@ -16703,10 +23348,12 @@ def get_security_group_without_preload_content( response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _get_security_group_serialize( + def _list_images_serialize( self, project_id, - security_group_id, + region, + all, + label_selector, _request_auth, _content_type, _headers, @@ -16727,9 +23374,17 @@ def _get_security_group_serialize( # process the path parameters if project_id is not None: _path_params["projectId"] = project_id - if security_group_id is not None: - _path_params["securityGroupId"] = security_group_id + if region is not None: + _path_params["region"] = region # process the query parameters + if all is not None: + + _query_params.append(("all", all)) + + if label_selector is not None: + + _query_params.append(("label_selector", label_selector)) + # process the header parameters # process the form parameters # process the body parameter @@ -16743,7 +23398,7 @@ def _get_security_group_serialize( return self.api_client.param_serialize( method="GET", - resource_path="/v1/projects/{projectId}/security-groups/{securityGroupId}", + resource_path="/v2beta1/projects/{projectId}/regions/{region}/images", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -16757,30 +23412,9 @@ def _get_security_group_serialize( ) @validate_call - def get_security_group_rule( + def list_key_pairs( self, - project_id: Annotated[ - str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), - ], - security_group_id: Annotated[ - str, - Field( - min_length=36, - strict=True, - max_length=36, - description="The identifier (ID) of a STACKIT Security Group.", - ), - ], - security_group_rule_id: Annotated[ - str, - Field( - min_length=36, - strict=True, - max_length=36, - description="The identifier (ID) of a STACKIT Security Group Rule.", - ), - ], + label_selector: Annotated[Optional[StrictStr], Field(description="Filter resources by labels.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -16790,17 +23424,13 @@ def get_security_group_rule( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> SecurityGroupRule: - """Get security group rule details. + ) -> KeyPairListResponse: + """List all SSH keypairs for the requesting user. - Get details about a security group rule of a project. + Get a list of all SSH keypairs assigned to the requesting user. - :param project_id: The identifier (ID) of a STACKIT Project. (required) - :type project_id: str - :param security_group_id: The identifier (ID) of a STACKIT Security Group. (required) - :type security_group_id: str - :param security_group_rule_id: The identifier (ID) of a STACKIT Security Group Rule. (required) - :type security_group_rule_id: str + :param label_selector: Filter resources by labels. + :type label_selector: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -16823,10 +23453,8 @@ def get_security_group_rule( :return: Returns the result object. """ # noqa: E501 - _param = self._get_security_group_rule_serialize( - project_id=project_id, - security_group_id=security_group_id, - security_group_rule_id=security_group_rule_id, + _param = self._list_key_pairs_serialize( + label_selector=label_selector, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -16834,7 +23462,7 @@ def get_security_group_rule( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "SecurityGroupRule", + "200": "KeyPairListResponse", "400": "Error", "401": "Error", "403": "Error", @@ -16849,30 +23477,9 @@ def get_security_group_rule( ).data @validate_call - def get_security_group_rule_with_http_info( + def list_key_pairs_with_http_info( self, - project_id: Annotated[ - str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), - ], - security_group_id: Annotated[ - str, - Field( - min_length=36, - strict=True, - max_length=36, - description="The identifier (ID) of a STACKIT Security Group.", - ), - ], - security_group_rule_id: Annotated[ - str, - Field( - min_length=36, - strict=True, - max_length=36, - description="The identifier (ID) of a STACKIT Security Group Rule.", - ), - ], + label_selector: Annotated[Optional[StrictStr], Field(description="Filter resources by labels.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -16882,17 +23489,13 @@ def get_security_group_rule_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[SecurityGroupRule]: - """Get security group rule details. + ) -> ApiResponse[KeyPairListResponse]: + """List all SSH keypairs for the requesting user. - Get details about a security group rule of a project. + Get a list of all SSH keypairs assigned to the requesting user. - :param project_id: The identifier (ID) of a STACKIT Project. (required) - :type project_id: str - :param security_group_id: The identifier (ID) of a STACKIT Security Group. (required) - :type security_group_id: str - :param security_group_rule_id: The identifier (ID) of a STACKIT Security Group Rule. (required) - :type security_group_rule_id: str + :param label_selector: Filter resources by labels. + :type label_selector: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -16915,10 +23518,8 @@ def get_security_group_rule_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._get_security_group_rule_serialize( - project_id=project_id, - security_group_id=security_group_id, - security_group_rule_id=security_group_rule_id, + _param = self._list_key_pairs_serialize( + label_selector=label_selector, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -16926,7 +23527,7 @@ def get_security_group_rule_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "SecurityGroupRule", + "200": "KeyPairListResponse", "400": "Error", "401": "Error", "403": "Error", @@ -16941,30 +23542,9 @@ def get_security_group_rule_with_http_info( ) @validate_call - def get_security_group_rule_without_preload_content( + def list_key_pairs_without_preload_content( self, - project_id: Annotated[ - str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), - ], - security_group_id: Annotated[ - str, - Field( - min_length=36, - strict=True, - max_length=36, - description="The identifier (ID) of a STACKIT Security Group.", - ), - ], - security_group_rule_id: Annotated[ - str, - Field( - min_length=36, - strict=True, - max_length=36, - description="The identifier (ID) of a STACKIT Security Group Rule.", - ), - ], + label_selector: Annotated[Optional[StrictStr], Field(description="Filter resources by labels.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -16975,16 +23555,12 @@ def get_security_group_rule_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Get security group rule details. + """List all SSH keypairs for the requesting user. - Get details about a security group rule of a project. + Get a list of all SSH keypairs assigned to the requesting user. - :param project_id: The identifier (ID) of a STACKIT Project. (required) - :type project_id: str - :param security_group_id: The identifier (ID) of a STACKIT Security Group. (required) - :type security_group_id: str - :param security_group_rule_id: The identifier (ID) of a STACKIT Security Group Rule. (required) - :type security_group_rule_id: str + :param label_selector: Filter resources by labels. + :type label_selector: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -17007,10 +23583,8 @@ def get_security_group_rule_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._get_security_group_rule_serialize( - project_id=project_id, - security_group_id=security_group_id, - security_group_rule_id=security_group_rule_id, + _param = self._list_key_pairs_serialize( + label_selector=label_selector, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -17018,7 +23592,7 @@ def get_security_group_rule_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "SecurityGroupRule", + "200": "KeyPairListResponse", "400": "Error", "401": "Error", "403": "Error", @@ -17028,11 +23602,9 @@ def get_security_group_rule_without_preload_content( response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _get_security_group_rule_serialize( + def _list_key_pairs_serialize( self, - project_id, - security_group_id, - security_group_rule_id, + label_selector, _request_auth, _content_type, _headers, @@ -17051,13 +23623,11 @@ def _get_security_group_rule_serialize( _body_params: Optional[bytes] = None # process the path parameters - if project_id is not None: - _path_params["projectId"] = project_id - if security_group_id is not None: - _path_params["securityGroupId"] = security_group_id - if security_group_rule_id is not None: - _path_params["securityGroupRuleId"] = security_group_rule_id # process the query parameters + if label_selector is not None: + + _query_params.append(("label_selector", label_selector)) + # process the header parameters # process the form parameters # process the body parameter @@ -17071,7 +23641,7 @@ def _get_security_group_rule_serialize( return self.api_client.param_serialize( method="GET", - resource_path="/v1/projects/{projectId}/security-groups/{securityGroupId}/rules/{securityGroupRuleId}", + resource_path="/v2beta1/keypairs", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -17085,17 +23655,19 @@ def _get_security_group_rule_serialize( ) @validate_call - def get_server( + def list_machine_types( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - server_id: Annotated[ - str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Server."), - ], - details: Annotated[Optional[StrictBool], Field(description="Show detailed information about server.")] = None, + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + filter: Annotated[ + Optional[StrictStr], + Field( + description="Filter resources by fields. A subset of expr-lang is supported. See https://expr-lang.org/docs/language-definition for usage details." + ), + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -17105,17 +23677,17 @@ def get_server( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> Server: - """Get server details. + ) -> MachineTypeListResponse: + """List all machine types available for a project. - Get details about a server by its ID. + Get a list of all machine type available in a project. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str - :param server_id: The identifier (ID) of a STACKIT Server. (required) - :type server_id: str - :param details: Show detailed information about server. - :type details: bool + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param filter: Filter resources by fields. A subset of expr-lang is supported. See https://expr-lang.org/docs/language-definition for usage details. + :type filter: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -17138,10 +23710,10 @@ def get_server( :return: Returns the result object. """ # noqa: E501 - _param = self._get_server_serialize( + _param = self._list_machine_types_serialize( project_id=project_id, - server_id=server_id, - details=details, + region=region, + filter=filter, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -17149,7 +23721,7 @@ def get_server( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Server", + "200": "MachineTypeListResponse", "400": "Error", "401": "Error", "403": "Error", @@ -17164,17 +23736,19 @@ def get_server( ).data @validate_call - def get_server_with_http_info( + def list_machine_types_with_http_info( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - server_id: Annotated[ - str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Server."), - ], - details: Annotated[Optional[StrictBool], Field(description="Show detailed information about server.")] = None, + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + filter: Annotated[ + Optional[StrictStr], + Field( + description="Filter resources by fields. A subset of expr-lang is supported. See https://expr-lang.org/docs/language-definition for usage details." + ), + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -17184,17 +23758,17 @@ def get_server_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[Server]: - """Get server details. + ) -> ApiResponse[MachineTypeListResponse]: + """List all machine types available for a project. - Get details about a server by its ID. + Get a list of all machine type available in a project. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str - :param server_id: The identifier (ID) of a STACKIT Server. (required) - :type server_id: str - :param details: Show detailed information about server. - :type details: bool + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param filter: Filter resources by fields. A subset of expr-lang is supported. See https://expr-lang.org/docs/language-definition for usage details. + :type filter: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -17217,10 +23791,10 @@ def get_server_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._get_server_serialize( + _param = self._list_machine_types_serialize( project_id=project_id, - server_id=server_id, - details=details, + region=region, + filter=filter, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -17228,7 +23802,7 @@ def get_server_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Server", + "200": "MachineTypeListResponse", "400": "Error", "401": "Error", "403": "Error", @@ -17243,17 +23817,19 @@ def get_server_with_http_info( ) @validate_call - def get_server_without_preload_content( + def list_machine_types_without_preload_content( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - server_id: Annotated[ - str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Server."), - ], - details: Annotated[Optional[StrictBool], Field(description="Show detailed information about server.")] = None, + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + filter: Annotated[ + Optional[StrictStr], + Field( + description="Filter resources by fields. A subset of expr-lang is supported. See https://expr-lang.org/docs/language-definition for usage details." + ), + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -17264,16 +23840,16 @@ def get_server_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Get server details. + """List all machine types available for a project. - Get details about a server by its ID. + Get a list of all machine type available in a project. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str - :param server_id: The identifier (ID) of a STACKIT Server. (required) - :type server_id: str - :param details: Show detailed information about server. - :type details: bool + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param filter: Filter resources by fields. A subset of expr-lang is supported. See https://expr-lang.org/docs/language-definition for usage details. + :type filter: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -17296,10 +23872,10 @@ def get_server_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._get_server_serialize( + _param = self._list_machine_types_serialize( project_id=project_id, - server_id=server_id, - details=details, + region=region, + filter=filter, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -17307,7 +23883,7 @@ def get_server_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Server", + "200": "MachineTypeListResponse", "400": "Error", "401": "Error", "403": "Error", @@ -17317,11 +23893,11 @@ def get_server_without_preload_content( response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _get_server_serialize( + def _list_machine_types_serialize( self, project_id, - server_id, - details, + region, + filter, _request_auth, _content_type, _headers, @@ -17342,12 +23918,12 @@ def _get_server_serialize( # process the path parameters if project_id is not None: _path_params["projectId"] = project_id - if server_id is not None: - _path_params["serverId"] = server_id + if region is not None: + _path_params["region"] = region # process the query parameters - if details is not None: + if filter is not None: - _query_params.append(("details", details)) + _query_params.append(("filter", filter)) # process the header parameters # process the form parameters @@ -17362,7 +23938,7 @@ def _get_server_serialize( return self.api_client.param_serialize( method="GET", - resource_path="/v1/projects/{projectId}/servers/{serverId}", + resource_path="/v2beta1/projects/{projectId}/regions/{region}/machine-types", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -17376,15 +23952,19 @@ def _get_server_serialize( ) @validate_call - def get_server_console( + def list_network_area_projects( self, - project_id: Annotated[ + organization_id: Annotated[ str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), + Field( + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Organization." + ), ], - server_id: Annotated[ + area_id: Annotated[ str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Server."), + Field( + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Network Area." + ), ], _request_timeout: Union[ None, @@ -17395,15 +23975,15 @@ def get_server_console( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ServerConsoleUrl: - """Get server console. + ) -> ProjectListResponse: + """List all projects using a network area. - Get a URL for server remote console. + Get a list of all projects using a network area. - :param project_id: The identifier (ID) of a STACKIT Project. (required) - :type project_id: str - :param server_id: The identifier (ID) of a STACKIT Server. (required) - :type server_id: str + :param organization_id: The identifier (ID) of a STACKIT Organization. (required) + :type organization_id: str + :param area_id: The identifier (ID) of a STACKIT Network Area. (required) + :type area_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -17426,9 +24006,9 @@ def get_server_console( :return: Returns the result object. """ # noqa: E501 - _param = self._get_server_console_serialize( - project_id=project_id, - server_id=server_id, + _param = self._list_network_area_projects_serialize( + organization_id=organization_id, + area_id=area_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -17436,7 +24016,7 @@ def get_server_console( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ServerConsoleUrl", + "200": "ProjectListResponse", "400": "Error", "401": "Error", "403": "Error", @@ -17451,15 +24031,19 @@ def get_server_console( ).data @validate_call - def get_server_console_with_http_info( + def list_network_area_projects_with_http_info( self, - project_id: Annotated[ + organization_id: Annotated[ str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), + Field( + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Organization." + ), ], - server_id: Annotated[ + area_id: Annotated[ str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Server."), + Field( + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Network Area." + ), ], _request_timeout: Union[ None, @@ -17470,15 +24054,15 @@ def get_server_console_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[ServerConsoleUrl]: - """Get server console. + ) -> ApiResponse[ProjectListResponse]: + """List all projects using a network area. - Get a URL for server remote console. + Get a list of all projects using a network area. - :param project_id: The identifier (ID) of a STACKIT Project. (required) - :type project_id: str - :param server_id: The identifier (ID) of a STACKIT Server. (required) - :type server_id: str + :param organization_id: The identifier (ID) of a STACKIT Organization. (required) + :type organization_id: str + :param area_id: The identifier (ID) of a STACKIT Network Area. (required) + :type area_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -17501,9 +24085,9 @@ def get_server_console_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._get_server_console_serialize( - project_id=project_id, - server_id=server_id, + _param = self._list_network_area_projects_serialize( + organization_id=organization_id, + area_id=area_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -17511,7 +24095,7 @@ def get_server_console_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ServerConsoleUrl", + "200": "ProjectListResponse", "400": "Error", "401": "Error", "403": "Error", @@ -17526,15 +24110,19 @@ def get_server_console_with_http_info( ) @validate_call - def get_server_console_without_preload_content( + def list_network_area_projects_without_preload_content( self, - project_id: Annotated[ + organization_id: Annotated[ str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), + Field( + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Organization." + ), ], - server_id: Annotated[ + area_id: Annotated[ str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Server."), + Field( + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Network Area." + ), ], _request_timeout: Union[ None, @@ -17546,14 +24134,14 @@ def get_server_console_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Get server console. + """List all projects using a network area. - Get a URL for server remote console. + Get a list of all projects using a network area. - :param project_id: The identifier (ID) of a STACKIT Project. (required) - :type project_id: str - :param server_id: The identifier (ID) of a STACKIT Server. (required) - :type server_id: str + :param organization_id: The identifier (ID) of a STACKIT Organization. (required) + :type organization_id: str + :param area_id: The identifier (ID) of a STACKIT Network Area. (required) + :type area_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -17576,9 +24164,9 @@ def get_server_console_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._get_server_console_serialize( - project_id=project_id, - server_id=server_id, + _param = self._list_network_area_projects_serialize( + organization_id=organization_id, + area_id=area_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -17586,7 +24174,7 @@ def get_server_console_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ServerConsoleUrl", + "200": "ProjectListResponse", "400": "Error", "401": "Error", "403": "Error", @@ -17596,10 +24184,10 @@ def get_server_console_without_preload_content( response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _get_server_console_serialize( + def _list_network_area_projects_serialize( self, - project_id, - server_id, + organization_id, + area_id, _request_auth, _content_type, _headers, @@ -17618,10 +24206,10 @@ def _get_server_console_serialize( _body_params: Optional[bytes] = None # process the path parameters - if project_id is not None: - _path_params["projectId"] = project_id - if server_id is not None: - _path_params["serverId"] = server_id + if organization_id is not None: + _path_params["organizationId"] = organization_id + if area_id is not None: + _path_params["areaId"] = area_id # process the query parameters # process the header parameters # process the form parameters @@ -17636,7 +24224,7 @@ def _get_server_console_serialize( return self.api_client.param_serialize( method="GET", - resource_path="/v1/projects/{projectId}/servers/{serverId}/console", + resource_path="/v2beta1/organizations/{organizationId}/network-areas/{areaId}/projects", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -17650,22 +24238,21 @@ def _get_server_console_serialize( ) @validate_call - def get_server_log( + def list_network_area_ranges( self, - project_id: Annotated[ + organization_id: Annotated[ str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), + Field( + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Organization." + ), ], - server_id: Annotated[ + area_id: Annotated[ str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Server."), - ], - length: Annotated[ - Optional[Annotated[int, Field(strict=True, ge=0)]], Field( - description="Request the server log. By default the length is limited to 2000 lines. Set to 0 to retrieve the complete log." + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Network Area." ), - ] = None, + ], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -17675,17 +24262,17 @@ def get_server_log( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> GetServerLog200Response: - """Get server log. + ) -> NetworkRangeListResponse: + """List all network ranges in a network area. - Get server console log. + Get a list of all network ranges in a network area. - :param project_id: The identifier (ID) of a STACKIT Project. (required) - :type project_id: str - :param server_id: The identifier (ID) of a STACKIT Server. (required) - :type server_id: str - :param length: Request the server log. By default the length is limited to 2000 lines. Set to 0 to retrieve the complete log. - :type length: int + :param organization_id: The identifier (ID) of a STACKIT Organization. (required) + :type organization_id: str + :param area_id: The identifier (ID) of a STACKIT Network Area. (required) + :type area_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -17708,10 +24295,10 @@ def get_server_log( :return: Returns the result object. """ # noqa: E501 - _param = self._get_server_log_serialize( - project_id=project_id, - server_id=server_id, - length=length, + _param = self._list_network_area_ranges_serialize( + organization_id=organization_id, + area_id=area_id, + region=region, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -17719,7 +24306,7 @@ def get_server_log( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetServerLog200Response", + "200": "NetworkRangeListResponse", "400": "Error", "401": "Error", "403": "Error", @@ -17734,22 +24321,21 @@ def get_server_log( ).data @validate_call - def get_server_log_with_http_info( + def list_network_area_ranges_with_http_info( self, - project_id: Annotated[ + organization_id: Annotated[ str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), + Field( + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Organization." + ), ], - server_id: Annotated[ + area_id: Annotated[ str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Server."), - ], - length: Annotated[ - Optional[Annotated[int, Field(strict=True, ge=0)]], Field( - description="Request the server log. By default the length is limited to 2000 lines. Set to 0 to retrieve the complete log." + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Network Area." ), - ] = None, + ], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -17759,17 +24345,17 @@ def get_server_log_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[GetServerLog200Response]: - """Get server log. + ) -> ApiResponse[NetworkRangeListResponse]: + """List all network ranges in a network area. - Get server console log. + Get a list of all network ranges in a network area. - :param project_id: The identifier (ID) of a STACKIT Project. (required) - :type project_id: str - :param server_id: The identifier (ID) of a STACKIT Server. (required) - :type server_id: str - :param length: Request the server log. By default the length is limited to 2000 lines. Set to 0 to retrieve the complete log. - :type length: int + :param organization_id: The identifier (ID) of a STACKIT Organization. (required) + :type organization_id: str + :param area_id: The identifier (ID) of a STACKIT Network Area. (required) + :type area_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -17792,10 +24378,10 @@ def get_server_log_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._get_server_log_serialize( - project_id=project_id, - server_id=server_id, - length=length, + _param = self._list_network_area_ranges_serialize( + organization_id=organization_id, + area_id=area_id, + region=region, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -17803,7 +24389,7 @@ def get_server_log_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetServerLog200Response", + "200": "NetworkRangeListResponse", "400": "Error", "401": "Error", "403": "Error", @@ -17818,22 +24404,21 @@ def get_server_log_with_http_info( ) @validate_call - def get_server_log_without_preload_content( + def list_network_area_ranges_without_preload_content( self, - project_id: Annotated[ + organization_id: Annotated[ str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), + Field( + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Organization." + ), ], - server_id: Annotated[ + area_id: Annotated[ str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Server."), - ], - length: Annotated[ - Optional[Annotated[int, Field(strict=True, ge=0)]], Field( - description="Request the server log. By default the length is limited to 2000 lines. Set to 0 to retrieve the complete log." + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Network Area." ), - ] = None, + ], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -17844,16 +24429,16 @@ def get_server_log_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Get server log. + """List all network ranges in a network area. - Get server console log. + Get a list of all network ranges in a network area. - :param project_id: The identifier (ID) of a STACKIT Project. (required) - :type project_id: str - :param server_id: The identifier (ID) of a STACKIT Server. (required) - :type server_id: str - :param length: Request the server log. By default the length is limited to 2000 lines. Set to 0 to retrieve the complete log. - :type length: int + :param organization_id: The identifier (ID) of a STACKIT Organization. (required) + :type organization_id: str + :param area_id: The identifier (ID) of a STACKIT Network Area. (required) + :type area_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -17876,10 +24461,10 @@ def get_server_log_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._get_server_log_serialize( - project_id=project_id, - server_id=server_id, - length=length, + _param = self._list_network_area_ranges_serialize( + organization_id=organization_id, + area_id=area_id, + region=region, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -17887,7 +24472,7 @@ def get_server_log_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetServerLog200Response", + "200": "NetworkRangeListResponse", "400": "Error", "401": "Error", "403": "Error", @@ -17897,11 +24482,11 @@ def get_server_log_without_preload_content( response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _get_server_log_serialize( + def _list_network_area_ranges_serialize( self, - project_id, - server_id, - length, + organization_id, + area_id, + region, _request_auth, _content_type, _headers, @@ -17920,15 +24505,13 @@ def _get_server_log_serialize( _body_params: Optional[bytes] = None # process the path parameters - if project_id is not None: - _path_params["projectId"] = project_id - if server_id is not None: - _path_params["serverId"] = server_id + if organization_id is not None: + _path_params["organizationId"] = organization_id + if area_id is not None: + _path_params["areaId"] = area_id + if region is not None: + _path_params["region"] = region # process the query parameters - if length is not None: - - _query_params.append(("length", length)) - # process the header parameters # process the form parameters # process the body parameter @@ -17942,7 +24525,7 @@ def _get_server_log_serialize( return self.api_client.param_serialize( method="GET", - resource_path="/v1/projects/{projectId}/servers/{serverId}/log", + resource_path="/v2beta1/organizations/{organizationId}/network-areas/{areaId}/regions/{region}/network-ranges", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -17956,16 +24539,22 @@ def _get_server_log_serialize( ) @validate_call - def get_snapshot( + def list_network_area_routes( self, - project_id: Annotated[ + organization_id: Annotated[ str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), + Field( + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Organization." + ), ], - snapshot_id: Annotated[ + area_id: Annotated[ str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Snapshot."), + Field( + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Network Area." + ), ], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + label_selector: Annotated[Optional[StrictStr], Field(description="Filter resources by labels.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -17975,15 +24564,19 @@ def get_snapshot( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> Snapshot: - """Get details about a snapshot. + ) -> RouteListResponse: + """List all network routes in a network area. - Get details about a block device snapshot. + Get a list of all network routes defined in a network area. - :param project_id: The identifier (ID) of a STACKIT Project. (required) - :type project_id: str - :param snapshot_id: The identifier (ID) of a STACKIT Snapshot. (required) - :type snapshot_id: str + :param organization_id: The identifier (ID) of a STACKIT Organization. (required) + :type organization_id: str + :param area_id: The identifier (ID) of a STACKIT Network Area. (required) + :type area_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param label_selector: Filter resources by labels. + :type label_selector: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -18006,9 +24599,11 @@ def get_snapshot( :return: Returns the result object. """ # noqa: E501 - _param = self._get_snapshot_serialize( - project_id=project_id, - snapshot_id=snapshot_id, + _param = self._list_network_area_routes_serialize( + organization_id=organization_id, + area_id=area_id, + region=region, + label_selector=label_selector, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -18016,7 +24611,7 @@ def get_snapshot( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Snapshot", + "200": "RouteListResponse", "400": "Error", "401": "Error", "403": "Error", @@ -18031,16 +24626,22 @@ def get_snapshot( ).data @validate_call - def get_snapshot_with_http_info( + def list_network_area_routes_with_http_info( self, - project_id: Annotated[ + organization_id: Annotated[ str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), + Field( + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Organization." + ), ], - snapshot_id: Annotated[ + area_id: Annotated[ str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Snapshot."), + Field( + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Network Area." + ), ], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + label_selector: Annotated[Optional[StrictStr], Field(description="Filter resources by labels.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -18050,15 +24651,19 @@ def get_snapshot_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[Snapshot]: - """Get details about a snapshot. + ) -> ApiResponse[RouteListResponse]: + """List all network routes in a network area. - Get details about a block device snapshot. + Get a list of all network routes defined in a network area. - :param project_id: The identifier (ID) of a STACKIT Project. (required) - :type project_id: str - :param snapshot_id: The identifier (ID) of a STACKIT Snapshot. (required) - :type snapshot_id: str + :param organization_id: The identifier (ID) of a STACKIT Organization. (required) + :type organization_id: str + :param area_id: The identifier (ID) of a STACKIT Network Area. (required) + :type area_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param label_selector: Filter resources by labels. + :type label_selector: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -18081,9 +24686,11 @@ def get_snapshot_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._get_snapshot_serialize( - project_id=project_id, - snapshot_id=snapshot_id, + _param = self._list_network_area_routes_serialize( + organization_id=organization_id, + area_id=area_id, + region=region, + label_selector=label_selector, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -18091,7 +24698,7 @@ def get_snapshot_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Snapshot", + "200": "RouteListResponse", "400": "Error", "401": "Error", "403": "Error", @@ -18106,16 +24713,22 @@ def get_snapshot_with_http_info( ) @validate_call - def get_snapshot_without_preload_content( + def list_network_area_routes_without_preload_content( self, - project_id: Annotated[ + organization_id: Annotated[ str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), + Field( + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Organization." + ), ], - snapshot_id: Annotated[ + area_id: Annotated[ str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Snapshot."), + Field( + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Network Area." + ), ], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + label_selector: Annotated[Optional[StrictStr], Field(description="Filter resources by labels.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -18126,14 +24739,18 @@ def get_snapshot_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Get details about a snapshot. + """List all network routes in a network area. - Get details about a block device snapshot. + Get a list of all network routes defined in a network area. - :param project_id: The identifier (ID) of a STACKIT Project. (required) - :type project_id: str - :param snapshot_id: The identifier (ID) of a STACKIT Snapshot. (required) - :type snapshot_id: str + :param organization_id: The identifier (ID) of a STACKIT Organization. (required) + :type organization_id: str + :param area_id: The identifier (ID) of a STACKIT Network Area. (required) + :type area_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param label_selector: Filter resources by labels. + :type label_selector: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -18156,9 +24773,11 @@ def get_snapshot_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._get_snapshot_serialize( - project_id=project_id, - snapshot_id=snapshot_id, + _param = self._list_network_area_routes_serialize( + organization_id=organization_id, + area_id=area_id, + region=region, + label_selector=label_selector, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -18166,7 +24785,7 @@ def get_snapshot_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Snapshot", + "200": "RouteListResponse", "400": "Error", "401": "Error", "403": "Error", @@ -18176,10 +24795,12 @@ def get_snapshot_without_preload_content( response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _get_snapshot_serialize( + def _list_network_area_routes_serialize( self, - project_id, - snapshot_id, + organization_id, + area_id, + region, + label_selector, _request_auth, _content_type, _headers, @@ -18198,11 +24819,17 @@ def _get_snapshot_serialize( _body_params: Optional[bytes] = None # process the path parameters - if project_id is not None: - _path_params["projectId"] = project_id - if snapshot_id is not None: - _path_params["snapshotId"] = snapshot_id + if organization_id is not None: + _path_params["organizationId"] = organization_id + if area_id is not None: + _path_params["areaId"] = area_id + if region is not None: + _path_params["region"] = region # process the query parameters + if label_selector is not None: + + _query_params.append(("label_selector", label_selector)) + # process the header parameters # process the form parameters # process the body parameter @@ -18216,7 +24843,7 @@ def _get_snapshot_serialize( return self.api_client.param_serialize( method="GET", - resource_path="/v1/projects/{projectId}/snapshots/{snapshotId}", + resource_path="/v2beta1/organizations/{organizationId}/network-areas/{areaId}/regions/{region}/routes", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -18230,16 +24857,15 @@ def _get_snapshot_serialize( ) @validate_call - def get_volume( + def list_network_areas( self, - project_id: Annotated[ - str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), - ], - volume_id: Annotated[ + organization_id: Annotated[ str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Volume."), + Field( + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Organization." + ), ], + label_selector: Annotated[Optional[StrictStr], Field(description="Filter resources by labels.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -18249,15 +24875,15 @@ def get_volume( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> Volume: - """Get details about a volume. + ) -> NetworkAreaListResponse: + """List all network areas in an organization. - Get details about a block device volume. + Get a list of all visible network areas defined in an organization. - :param project_id: The identifier (ID) of a STACKIT Project. (required) - :type project_id: str - :param volume_id: The identifier (ID) of a STACKIT Volume. (required) - :type volume_id: str + :param organization_id: The identifier (ID) of a STACKIT Organization. (required) + :type organization_id: str + :param label_selector: Filter resources by labels. + :type label_selector: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -18280,9 +24906,9 @@ def get_volume( :return: Returns the result object. """ # noqa: E501 - _param = self._get_volume_serialize( - project_id=project_id, - volume_id=volume_id, + _param = self._list_network_areas_serialize( + organization_id=organization_id, + label_selector=label_selector, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -18290,7 +24916,7 @@ def get_volume( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Volume", + "200": "NetworkAreaListResponse", "400": "Error", "401": "Error", "403": "Error", @@ -18305,16 +24931,15 @@ def get_volume( ).data @validate_call - def get_volume_with_http_info( + def list_network_areas_with_http_info( self, - project_id: Annotated[ - str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), - ], - volume_id: Annotated[ + organization_id: Annotated[ str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Volume."), + Field( + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Organization." + ), ], + label_selector: Annotated[Optional[StrictStr], Field(description="Filter resources by labels.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -18324,15 +24949,15 @@ def get_volume_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[Volume]: - """Get details about a volume. + ) -> ApiResponse[NetworkAreaListResponse]: + """List all network areas in an organization. - Get details about a block device volume. + Get a list of all visible network areas defined in an organization. - :param project_id: The identifier (ID) of a STACKIT Project. (required) - :type project_id: str - :param volume_id: The identifier (ID) of a STACKIT Volume. (required) - :type volume_id: str + :param organization_id: The identifier (ID) of a STACKIT Organization. (required) + :type organization_id: str + :param label_selector: Filter resources by labels. + :type label_selector: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -18355,9 +24980,9 @@ def get_volume_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._get_volume_serialize( - project_id=project_id, - volume_id=volume_id, + _param = self._list_network_areas_serialize( + organization_id=organization_id, + label_selector=label_selector, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -18365,7 +24990,7 @@ def get_volume_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Volume", + "200": "NetworkAreaListResponse", "400": "Error", "401": "Error", "403": "Error", @@ -18380,16 +25005,15 @@ def get_volume_with_http_info( ) @validate_call - def get_volume_without_preload_content( + def list_network_areas_without_preload_content( self, - project_id: Annotated[ - str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), - ], - volume_id: Annotated[ + organization_id: Annotated[ str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Volume."), + Field( + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Organization." + ), ], + label_selector: Annotated[Optional[StrictStr], Field(description="Filter resources by labels.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -18400,14 +25024,14 @@ def get_volume_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Get details about a volume. + """List all network areas in an organization. - Get details about a block device volume. + Get a list of all visible network areas defined in an organization. - :param project_id: The identifier (ID) of a STACKIT Project. (required) - :type project_id: str - :param volume_id: The identifier (ID) of a STACKIT Volume. (required) - :type volume_id: str + :param organization_id: The identifier (ID) of a STACKIT Organization. (required) + :type organization_id: str + :param label_selector: Filter resources by labels. + :type label_selector: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -18430,9 +25054,9 @@ def get_volume_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._get_volume_serialize( - project_id=project_id, - volume_id=volume_id, + _param = self._list_network_areas_serialize( + organization_id=organization_id, + label_selector=label_selector, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -18440,7 +25064,7 @@ def get_volume_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Volume", + "200": "NetworkAreaListResponse", "400": "Error", "401": "Error", "403": "Error", @@ -18450,10 +25074,10 @@ def get_volume_without_preload_content( response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _get_volume_serialize( + def _list_network_areas_serialize( self, - project_id, - volume_id, + organization_id, + label_selector, _request_auth, _content_type, _headers, @@ -18472,11 +25096,13 @@ def _get_volume_serialize( _body_params: Optional[bytes] = None # process the path parameters - if project_id is not None: - _path_params["projectId"] = project_id - if volume_id is not None: - _path_params["volumeId"] = volume_id + if organization_id is not None: + _path_params["organizationId"] = organization_id # process the query parameters + if label_selector is not None: + + _query_params.append(("label_selector", label_selector)) + # process the header parameters # process the form parameters # process the body parameter @@ -18490,7 +25116,7 @@ def _get_volume_serialize( return self.api_client.param_serialize( method="GET", - resource_path="/v1/projects/{projectId}/volumes/{volumeId}", + resource_path="/v2beta1/organizations/{organizationId}/network-areas", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -18504,15 +25130,14 @@ def _get_volume_serialize( ) @validate_call - def get_volume_performance_class( + def list_networks( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - volume_performance_class: Annotated[ - str, Field(strict=True, max_length=127, description="The name of a STACKIT Volume performance class.") - ], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + label_selector: Annotated[Optional[StrictStr], Field(description="Filter resources by labels.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -18522,15 +25147,17 @@ def get_volume_performance_class( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> VolumePerformanceClass: - """Get details about a volume performance class. + ) -> NetworkListResponse: + """List all networks inside a project. - Get details about a specific volume performance class. + Get a list of all networks inside a project. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str - :param volume_performance_class: The name of a STACKIT Volume performance class. (required) - :type volume_performance_class: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param label_selector: Filter resources by labels. + :type label_selector: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -18553,9 +25180,10 @@ def get_volume_performance_class( :return: Returns the result object. """ # noqa: E501 - _param = self._get_volume_performance_class_serialize( + _param = self._list_networks_serialize( project_id=project_id, - volume_performance_class=volume_performance_class, + region=region, + label_selector=label_selector, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -18563,7 +25191,7 @@ def get_volume_performance_class( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "VolumePerformanceClass", + "200": "NetworkListResponse", "400": "Error", "401": "Error", "403": "Error", @@ -18578,15 +25206,14 @@ def get_volume_performance_class( ).data @validate_call - def get_volume_performance_class_with_http_info( + def list_networks_with_http_info( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - volume_performance_class: Annotated[ - str, Field(strict=True, max_length=127, description="The name of a STACKIT Volume performance class.") - ], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + label_selector: Annotated[Optional[StrictStr], Field(description="Filter resources by labels.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -18596,15 +25223,17 @@ def get_volume_performance_class_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[VolumePerformanceClass]: - """Get details about a volume performance class. + ) -> ApiResponse[NetworkListResponse]: + """List all networks inside a project. - Get details about a specific volume performance class. + Get a list of all networks inside a project. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str - :param volume_performance_class: The name of a STACKIT Volume performance class. (required) - :type volume_performance_class: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param label_selector: Filter resources by labels. + :type label_selector: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -18627,9 +25256,10 @@ def get_volume_performance_class_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._get_volume_performance_class_serialize( + _param = self._list_networks_serialize( project_id=project_id, - volume_performance_class=volume_performance_class, + region=region, + label_selector=label_selector, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -18637,7 +25267,7 @@ def get_volume_performance_class_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "VolumePerformanceClass", + "200": "NetworkListResponse", "400": "Error", "401": "Error", "403": "Error", @@ -18652,15 +25282,14 @@ def get_volume_performance_class_with_http_info( ) @validate_call - def get_volume_performance_class_without_preload_content( + def list_networks_without_preload_content( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - volume_performance_class: Annotated[ - str, Field(strict=True, max_length=127, description="The name of a STACKIT Volume performance class.") - ], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + label_selector: Annotated[Optional[StrictStr], Field(description="Filter resources by labels.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -18671,14 +25300,16 @@ def get_volume_performance_class_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Get details about a volume performance class. + """List all networks inside a project. - Get details about a specific volume performance class. + Get a list of all networks inside a project. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str - :param volume_performance_class: The name of a STACKIT Volume performance class. (required) - :type volume_performance_class: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param label_selector: Filter resources by labels. + :type label_selector: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -18701,9 +25332,10 @@ def get_volume_performance_class_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._get_volume_performance_class_serialize( + _param = self._list_networks_serialize( project_id=project_id, - volume_performance_class=volume_performance_class, + region=region, + label_selector=label_selector, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -18711,7 +25343,7 @@ def get_volume_performance_class_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "VolumePerformanceClass", + "200": "NetworkListResponse", "400": "Error", "401": "Error", "403": "Error", @@ -18721,10 +25353,11 @@ def get_volume_performance_class_without_preload_content( response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _get_volume_performance_class_serialize( + def _list_networks_serialize( self, project_id, - volume_performance_class, + region, + label_selector, _request_auth, _content_type, _headers, @@ -18745,9 +25378,13 @@ def _get_volume_performance_class_serialize( # process the path parameters if project_id is not None: _path_params["projectId"] = project_id - if volume_performance_class is not None: - _path_params["volumePerformanceClass"] = volume_performance_class + if region is not None: + _path_params["region"] = region # process the query parameters + if label_selector is not None: + + _query_params.append(("label_selector", label_selector)) + # process the header parameters # process the form parameters # process the body parameter @@ -18761,7 +25398,7 @@ def _get_volume_performance_class_serialize( return self.api_client.param_serialize( method="GET", - resource_path="/v1/projects/{projectId}/volume-performance-classes/{volumePerformanceClass}", + resource_path="/v2beta1/projects/{projectId}/regions/{region}/networks", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -18775,12 +25412,18 @@ def _get_volume_performance_class_serialize( ) @validate_call - def list_affinity_groups( + def list_nics( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + network_id: Annotated[ + str, + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Network."), + ], + label_selector: Annotated[Optional[StrictStr], Field(description="Filter resources by labels.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -18790,13 +25433,19 @@ def list_affinity_groups( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> AffinityGroupListResponse: - """Get the affinity groups setup for a project. + ) -> NICListResponse: + """List all network interfaces inside a network. - Get the affinity groups created in a project. Affinity groups are an indication of locality of a server relative to another group of servers. They can be either running on the same host (affinity) or on different ones (anti-affinity). + Get a list of all network interfaces inside a network. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param network_id: The identifier (ID) of a STACKIT Network. (required) + :type network_id: str + :param label_selector: Filter resources by labels. + :type label_selector: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -18819,8 +25468,11 @@ def list_affinity_groups( :return: Returns the result object. """ # noqa: E501 - _param = self._list_affinity_groups_serialize( + _param = self._list_nics_serialize( project_id=project_id, + region=region, + network_id=network_id, + label_selector=label_selector, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -18828,12 +25480,11 @@ def list_affinity_groups( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "AffinityGroupListResponse", + "200": "NICListResponse", "400": "Error", "401": "Error", "403": "Error", "404": "Error", - "409": "Error", "500": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -18844,12 +25495,18 @@ def list_affinity_groups( ).data @validate_call - def list_affinity_groups_with_http_info( + def list_nics_with_http_info( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + network_id: Annotated[ + str, + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Network."), + ], + label_selector: Annotated[Optional[StrictStr], Field(description="Filter resources by labels.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -18859,13 +25516,19 @@ def list_affinity_groups_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[AffinityGroupListResponse]: - """Get the affinity groups setup for a project. + ) -> ApiResponse[NICListResponse]: + """List all network interfaces inside a network. - Get the affinity groups created in a project. Affinity groups are an indication of locality of a server relative to another group of servers. They can be either running on the same host (affinity) or on different ones (anti-affinity). + Get a list of all network interfaces inside a network. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param network_id: The identifier (ID) of a STACKIT Network. (required) + :type network_id: str + :param label_selector: Filter resources by labels. + :type label_selector: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -18888,8 +25551,11 @@ def list_affinity_groups_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._list_affinity_groups_serialize( + _param = self._list_nics_serialize( project_id=project_id, + region=region, + network_id=network_id, + label_selector=label_selector, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -18897,12 +25563,11 @@ def list_affinity_groups_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "AffinityGroupListResponse", + "200": "NICListResponse", "400": "Error", "401": "Error", "403": "Error", "404": "Error", - "409": "Error", "500": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -18913,12 +25578,18 @@ def list_affinity_groups_with_http_info( ) @validate_call - def list_affinity_groups_without_preload_content( + def list_nics_without_preload_content( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + network_id: Annotated[ + str, + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Network."), + ], + label_selector: Annotated[Optional[StrictStr], Field(description="Filter resources by labels.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -18929,12 +25600,18 @@ def list_affinity_groups_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Get the affinity groups setup for a project. + """List all network interfaces inside a network. - Get the affinity groups created in a project. Affinity groups are an indication of locality of a server relative to another group of servers. They can be either running on the same host (affinity) or on different ones (anti-affinity). + Get a list of all network interfaces inside a network. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param network_id: The identifier (ID) of a STACKIT Network. (required) + :type network_id: str + :param label_selector: Filter resources by labels. + :type label_selector: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -18957,8 +25634,11 @@ def list_affinity_groups_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._list_affinity_groups_serialize( + _param = self._list_nics_serialize( project_id=project_id, + region=region, + network_id=network_id, + label_selector=label_selector, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -18966,20 +25646,22 @@ def list_affinity_groups_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "AffinityGroupListResponse", + "200": "NICListResponse", "400": "Error", "401": "Error", "403": "Error", "404": "Error", - "409": "Error", "500": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _list_affinity_groups_serialize( + def _list_nics_serialize( self, project_id, + region, + network_id, + label_selector, _request_auth, _content_type, _headers, @@ -19000,7 +25682,15 @@ def _list_affinity_groups_serialize( # process the path parameters if project_id is not None: _path_params["projectId"] = project_id + if region is not None: + _path_params["region"] = region + if network_id is not None: + _path_params["networkId"] = network_id # process the query parameters + if label_selector is not None: + + _query_params.append(("label_selector", label_selector)) + # process the header parameters # process the form parameters # process the body parameter @@ -19014,7 +25704,7 @@ def _list_affinity_groups_serialize( return self.api_client.param_serialize( method="GET", - resource_path="/v1/projects/{projectId}/affinity-groups", + resource_path="/v2beta1/projects/{projectId}/regions/{region}/networks/{networkId}/nics", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -19028,16 +25718,14 @@ def _list_affinity_groups_serialize( ) @validate_call - def list_attached_volumes( + def list_project_nics( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - server_id: Annotated[ - str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Server."), - ], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + label_selector: Annotated[Optional[StrictStr], Field(description="Filter resources by labels.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -19047,15 +25735,17 @@ def list_attached_volumes( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> VolumeAttachmentListResponse: - """List all volume attachments of a server. + ) -> NICListResponse: + """List all network interfaces inside a project. - Get a list of all volume attachments of a server. + Get a list of all network interfaces inside a project. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str - :param server_id: The identifier (ID) of a STACKIT Server. (required) - :type server_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param label_selector: Filter resources by labels. + :type label_selector: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -19078,9 +25768,10 @@ def list_attached_volumes( :return: Returns the result object. """ # noqa: E501 - _param = self._list_attached_volumes_serialize( + _param = self._list_project_nics_serialize( project_id=project_id, - server_id=server_id, + region=region, + label_selector=label_selector, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -19088,7 +25779,7 @@ def list_attached_volumes( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "VolumeAttachmentListResponse", + "200": "NICListResponse", "400": "Error", "401": "Error", "403": "Error", @@ -19103,16 +25794,14 @@ def list_attached_volumes( ).data @validate_call - def list_attached_volumes_with_http_info( + def list_project_nics_with_http_info( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - server_id: Annotated[ - str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Server."), - ], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + label_selector: Annotated[Optional[StrictStr], Field(description="Filter resources by labels.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -19122,15 +25811,17 @@ def list_attached_volumes_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[VolumeAttachmentListResponse]: - """List all volume attachments of a server. + ) -> ApiResponse[NICListResponse]: + """List all network interfaces inside a project. - Get a list of all volume attachments of a server. + Get a list of all network interfaces inside a project. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str - :param server_id: The identifier (ID) of a STACKIT Server. (required) - :type server_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param label_selector: Filter resources by labels. + :type label_selector: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -19153,9 +25844,10 @@ def list_attached_volumes_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._list_attached_volumes_serialize( + _param = self._list_project_nics_serialize( project_id=project_id, - server_id=server_id, + region=region, + label_selector=label_selector, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -19163,7 +25855,7 @@ def list_attached_volumes_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "VolumeAttachmentListResponse", + "200": "NICListResponse", "400": "Error", "401": "Error", "403": "Error", @@ -19178,16 +25870,14 @@ def list_attached_volumes_with_http_info( ) @validate_call - def list_attached_volumes_without_preload_content( + def list_project_nics_without_preload_content( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - server_id: Annotated[ - str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Server."), - ], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + label_selector: Annotated[Optional[StrictStr], Field(description="Filter resources by labels.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -19198,14 +25888,16 @@ def list_attached_volumes_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """List all volume attachments of a server. + """List all network interfaces inside a project. - Get a list of all volume attachments of a server. + Get a list of all network interfaces inside a project. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str - :param server_id: The identifier (ID) of a STACKIT Server. (required) - :type server_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param label_selector: Filter resources by labels. + :type label_selector: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -19228,9 +25920,10 @@ def list_attached_volumes_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._list_attached_volumes_serialize( + _param = self._list_project_nics_serialize( project_id=project_id, - server_id=server_id, + region=region, + label_selector=label_selector, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -19238,7 +25931,7 @@ def list_attached_volumes_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "VolumeAttachmentListResponse", + "200": "NICListResponse", "400": "Error", "401": "Error", "403": "Error", @@ -19248,10 +25941,11 @@ def list_attached_volumes_without_preload_content( response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _list_attached_volumes_serialize( + def _list_project_nics_serialize( self, project_id, - server_id, + region, + label_selector, _request_auth, _content_type, _headers, @@ -19272,9 +25966,13 @@ def _list_attached_volumes_serialize( # process the path parameters if project_id is not None: _path_params["projectId"] = project_id - if server_id is not None: - _path_params["serverId"] = server_id + if region is not None: + _path_params["region"] = region # process the query parameters + if label_selector is not None: + + _query_params.append(("label_selector", label_selector)) + # process the header parameters # process the form parameters # process the body parameter @@ -19288,7 +25986,7 @@ def _list_attached_volumes_serialize( return self.api_client.param_serialize( method="GET", - resource_path="/v1/projects/{projectId}/servers/{serverId}/volume-attachments", + resource_path="/v2beta1/projects/{projectId}/regions/{region}/nics", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -19302,7 +26000,7 @@ def _list_attached_volumes_serialize( ) @validate_call - def list_availability_zones( + def list_public_ip_ranges( self, _request_timeout: Union[ None, @@ -19313,10 +26011,10 @@ def list_availability_zones( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> AvailabilityZoneListResponse: - """List all availability zones. + ) -> PublicNetworkListResponse: + """List all public IP ranges. - Get a list of all availability zones. + Get a list of all public IP ranges that STACKIT uses. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -19340,12 +26038,12 @@ def list_availability_zones( :return: Returns the result object. """ # noqa: E501 - _param = self._list_availability_zones_serialize( + _param = self._list_public_ip_ranges_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "AvailabilityZoneListResponse", + "200": "PublicNetworkListResponse", "400": "Error", "401": "Error", "403": "Error", @@ -19360,7 +26058,7 @@ def list_availability_zones( ).data @validate_call - def list_availability_zones_with_http_info( + def list_public_ip_ranges_with_http_info( self, _request_timeout: Union[ None, @@ -19371,10 +26069,10 @@ def list_availability_zones_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[AvailabilityZoneListResponse]: - """List all availability zones. + ) -> ApiResponse[PublicNetworkListResponse]: + """List all public IP ranges. - Get a list of all availability zones. + Get a list of all public IP ranges that STACKIT uses. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -19398,12 +26096,12 @@ def list_availability_zones_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._list_availability_zones_serialize( + _param = self._list_public_ip_ranges_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "AvailabilityZoneListResponse", + "200": "PublicNetworkListResponse", "400": "Error", "401": "Error", "403": "Error", @@ -19418,7 +26116,7 @@ def list_availability_zones_with_http_info( ) @validate_call - def list_availability_zones_without_preload_content( + def list_public_ip_ranges_without_preload_content( self, _request_timeout: Union[ None, @@ -19430,9 +26128,9 @@ def list_availability_zones_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """List all availability zones. + """List all public IP ranges. - Get a list of all availability zones. + Get a list of all public IP ranges that STACKIT uses. :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -19456,12 +26154,12 @@ def list_availability_zones_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._list_availability_zones_serialize( + _param = self._list_public_ip_ranges_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "AvailabilityZoneListResponse", + "200": "PublicNetworkListResponse", "400": "Error", "401": "Error", "403": "Error", @@ -19471,7 +26169,7 @@ def list_availability_zones_without_preload_content( response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _list_availability_zones_serialize( + def _list_public_ip_ranges_serialize( self, _request_auth, _content_type, @@ -19505,7 +26203,7 @@ def _list_availability_zones_serialize( return self.api_client.param_serialize( method="GET", - resource_path="/v1/availability-zones", + resource_path="/v2beta1/networks/public-ip-ranges", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -19519,12 +26217,13 @@ def _list_availability_zones_serialize( ) @validate_call - def list_backups( + def list_public_ips( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], label_selector: Annotated[Optional[StrictStr], Field(description="Filter resources by labels.")] = None, _request_timeout: Union[ None, @@ -19535,13 +26234,15 @@ def list_backups( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> BackupListResponse: - """List all backups inside a project. + ) -> PublicIpListResponse: + """List all public IPs inside a project. - Get a list of all backups inside a project. + Get a list of all public IPs inside a project. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str :param label_selector: Filter resources by labels. :type label_selector: str :param _request_timeout: timeout setting for this request. If one @@ -19566,8 +26267,9 @@ def list_backups( :return: Returns the result object. """ # noqa: E501 - _param = self._list_backups_serialize( + _param = self._list_public_ips_serialize( project_id=project_id, + region=region, label_selector=label_selector, _request_auth=_request_auth, _content_type=_content_type, @@ -19576,7 +26278,7 @@ def list_backups( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "BackupListResponse", + "200": "PublicIpListResponse", "400": "Error", "401": "Error", "403": "Error", @@ -19591,12 +26293,13 @@ def list_backups( ).data @validate_call - def list_backups_with_http_info( + def list_public_ips_with_http_info( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], label_selector: Annotated[Optional[StrictStr], Field(description="Filter resources by labels.")] = None, _request_timeout: Union[ None, @@ -19607,13 +26310,15 @@ def list_backups_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[BackupListResponse]: - """List all backups inside a project. + ) -> ApiResponse[PublicIpListResponse]: + """List all public IPs inside a project. - Get a list of all backups inside a project. + Get a list of all public IPs inside a project. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str :param label_selector: Filter resources by labels. :type label_selector: str :param _request_timeout: timeout setting for this request. If one @@ -19638,8 +26343,9 @@ def list_backups_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._list_backups_serialize( + _param = self._list_public_ips_serialize( project_id=project_id, + region=region, label_selector=label_selector, _request_auth=_request_auth, _content_type=_content_type, @@ -19648,7 +26354,7 @@ def list_backups_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "BackupListResponse", + "200": "PublicIpListResponse", "400": "Error", "401": "Error", "403": "Error", @@ -19663,12 +26369,13 @@ def list_backups_with_http_info( ) @validate_call - def list_backups_without_preload_content( + def list_public_ips_without_preload_content( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], label_selector: Annotated[Optional[StrictStr], Field(description="Filter resources by labels.")] = None, _request_timeout: Union[ None, @@ -19680,12 +26387,14 @@ def list_backups_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """List all backups inside a project. + """List all public IPs inside a project. - Get a list of all backups inside a project. + Get a list of all public IPs inside a project. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str :param label_selector: Filter resources by labels. :type label_selector: str :param _request_timeout: timeout setting for this request. If one @@ -19710,8 +26419,9 @@ def list_backups_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._list_backups_serialize( + _param = self._list_public_ips_serialize( project_id=project_id, + region=region, label_selector=label_selector, _request_auth=_request_auth, _content_type=_content_type, @@ -19720,7 +26430,7 @@ def list_backups_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "BackupListResponse", + "200": "PublicIpListResponse", "400": "Error", "401": "Error", "403": "Error", @@ -19730,9 +26440,10 @@ def list_backups_without_preload_content( response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _list_backups_serialize( + def _list_public_ips_serialize( self, project_id, + region, label_selector, _request_auth, _content_type, @@ -19754,6 +26465,8 @@ def _list_backups_serialize( # process the path parameters if project_id is not None: _path_params["projectId"] = project_id + if region is not None: + _path_params["region"] = region # process the query parameters if label_selector is not None: @@ -19772,7 +26485,7 @@ def _list_backups_serialize( return self.api_client.param_serialize( method="GET", - resource_path="/v1/projects/{projectId}/backups", + resource_path="/v2beta1/projects/{projectId}/regions/{region}/public-ips", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -19786,14 +26499,13 @@ def _list_backups_serialize( ) @validate_call - def list_images( + def list_quotas( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - all: Annotated[Optional[StrictBool], Field(description="List all Images.")] = None, - label_selector: Annotated[Optional[StrictStr], Field(description="Filter resources by labels.")] = None, + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -19803,17 +26515,15 @@ def list_images( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ImageListResponse: - """List all Images inside a project. + ) -> QuotaListResponse: + """List project quotas. - Get a list of all images inside a project. + List quota limits and usage for project resources. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str - :param all: List all Images. - :type all: bool - :param label_selector: Filter resources by labels. - :type label_selector: str + :param region: The STACKIT Region of the resources. (required) + :type region: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -19836,10 +26546,9 @@ def list_images( :return: Returns the result object. """ # noqa: E501 - _param = self._list_images_serialize( + _param = self._list_quotas_serialize( project_id=project_id, - all=all, - label_selector=label_selector, + region=region, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -19847,7 +26556,7 @@ def list_images( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ImageListResponse", + "200": "QuotaListResponse", "400": "Error", "401": "Error", "403": "Error", @@ -19862,14 +26571,13 @@ def list_images( ).data @validate_call - def list_images_with_http_info( + def list_quotas_with_http_info( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - all: Annotated[Optional[StrictBool], Field(description="List all Images.")] = None, - label_selector: Annotated[Optional[StrictStr], Field(description="Filter resources by labels.")] = None, + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -19879,17 +26587,15 @@ def list_images_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[ImageListResponse]: - """List all Images inside a project. + ) -> ApiResponse[QuotaListResponse]: + """List project quotas. - Get a list of all images inside a project. + List quota limits and usage for project resources. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str - :param all: List all Images. - :type all: bool - :param label_selector: Filter resources by labels. - :type label_selector: str + :param region: The STACKIT Region of the resources. (required) + :type region: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -19912,10 +26618,9 @@ def list_images_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._list_images_serialize( + _param = self._list_quotas_serialize( project_id=project_id, - all=all, - label_selector=label_selector, + region=region, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -19923,7 +26628,7 @@ def list_images_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ImageListResponse", + "200": "QuotaListResponse", "400": "Error", "401": "Error", "403": "Error", @@ -19938,14 +26643,13 @@ def list_images_with_http_info( ) @validate_call - def list_images_without_preload_content( + def list_quotas_without_preload_content( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - all: Annotated[Optional[StrictBool], Field(description="List all Images.")] = None, - label_selector: Annotated[Optional[StrictStr], Field(description="Filter resources by labels.")] = None, + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -19956,16 +26660,14 @@ def list_images_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """List all Images inside a project. + """List project quotas. - Get a list of all images inside a project. + List quota limits and usage for project resources. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str - :param all: List all Images. - :type all: bool - :param label_selector: Filter resources by labels. - :type label_selector: str + :param region: The STACKIT Region of the resources. (required) + :type region: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -19988,10 +26690,9 @@ def list_images_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._list_images_serialize( + _param = self._list_quotas_serialize( project_id=project_id, - all=all, - label_selector=label_selector, + region=region, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -19999,7 +26700,7 @@ def list_images_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ImageListResponse", + "200": "QuotaListResponse", "400": "Error", "401": "Error", "403": "Error", @@ -20009,11 +26710,10 @@ def list_images_without_preload_content( response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _list_images_serialize( + def _list_quotas_serialize( self, project_id, - all, - label_selector, + region, _request_auth, _content_type, _headers, @@ -20034,15 +26734,9 @@ def _list_images_serialize( # process the path parameters if project_id is not None: _path_params["projectId"] = project_id + if region is not None: + _path_params["region"] = region # process the query parameters - if all is not None: - - _query_params.append(("all", all)) - - if label_selector is not None: - - _query_params.append(("label_selector", label_selector)) - # process the header parameters # process the form parameters # process the body parameter @@ -20056,7 +26750,7 @@ def _list_images_serialize( return self.api_client.param_serialize( method="GET", - resource_path="/v1/projects/{projectId}/images", + resource_path="/v2beta1/projects/{projectId}/regions/{region}/quotas", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -20070,9 +26764,13 @@ def _list_images_serialize( ) @validate_call - def list_key_pairs( + def list_routes_of_management_network( self, - label_selector: Annotated[Optional[StrictStr], Field(description="Filter resources by labels.")] = None, + project_id: Annotated[ + str, + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), + ], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -20082,13 +26780,15 @@ def list_key_pairs( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> KeyPairListResponse: - """List all SSH keypairs for the requesting user. + ) -> ManagementRouteListResponse: + """List all routes for a management network. - Get a list of all SSH keypairs assigned to the requesting user. + Get a list of all routes attached to a managed metwork. - :param label_selector: Filter resources by labels. - :type label_selector: str + :param project_id: The identifier (ID) of a STACKIT Project. (required) + :type project_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -20111,8 +26811,9 @@ def list_key_pairs( :return: Returns the result object. """ # noqa: E501 - _param = self._list_key_pairs_serialize( - label_selector=label_selector, + _param = self._list_routes_of_management_network_serialize( + project_id=project_id, + region=region, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -20120,7 +26821,7 @@ def list_key_pairs( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "KeyPairListResponse", + "200": "ManagementRouteListResponse", "400": "Error", "401": "Error", "403": "Error", @@ -20135,9 +26836,13 @@ def list_key_pairs( ).data @validate_call - def list_key_pairs_with_http_info( + def list_routes_of_management_network_with_http_info( self, - label_selector: Annotated[Optional[StrictStr], Field(description="Filter resources by labels.")] = None, + project_id: Annotated[ + str, + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), + ], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -20147,13 +26852,15 @@ def list_key_pairs_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[KeyPairListResponse]: - """List all SSH keypairs for the requesting user. + ) -> ApiResponse[ManagementRouteListResponse]: + """List all routes for a management network. - Get a list of all SSH keypairs assigned to the requesting user. + Get a list of all routes attached to a managed metwork. - :param label_selector: Filter resources by labels. - :type label_selector: str + :param project_id: The identifier (ID) of a STACKIT Project. (required) + :type project_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -20176,8 +26883,9 @@ def list_key_pairs_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._list_key_pairs_serialize( - label_selector=label_selector, + _param = self._list_routes_of_management_network_serialize( + project_id=project_id, + region=region, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -20185,7 +26893,7 @@ def list_key_pairs_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "KeyPairListResponse", + "200": "ManagementRouteListResponse", "400": "Error", "401": "Error", "403": "Error", @@ -20200,9 +26908,13 @@ def list_key_pairs_with_http_info( ) @validate_call - def list_key_pairs_without_preload_content( + def list_routes_of_management_network_without_preload_content( self, - label_selector: Annotated[Optional[StrictStr], Field(description="Filter resources by labels.")] = None, + project_id: Annotated[ + str, + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), + ], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -20213,12 +26925,14 @@ def list_key_pairs_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """List all SSH keypairs for the requesting user. + """List all routes for a management network. - Get a list of all SSH keypairs assigned to the requesting user. + Get a list of all routes attached to a managed metwork. - :param label_selector: Filter resources by labels. - :type label_selector: str + :param project_id: The identifier (ID) of a STACKIT Project. (required) + :type project_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -20241,8 +26955,9 @@ def list_key_pairs_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._list_key_pairs_serialize( - label_selector=label_selector, + _param = self._list_routes_of_management_network_serialize( + project_id=project_id, + region=region, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -20250,7 +26965,7 @@ def list_key_pairs_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "KeyPairListResponse", + "200": "ManagementRouteListResponse", "400": "Error", "401": "Error", "403": "Error", @@ -20260,9 +26975,10 @@ def list_key_pairs_without_preload_content( response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _list_key_pairs_serialize( + def _list_routes_of_management_network_serialize( self, - label_selector, + project_id, + region, _request_auth, _content_type, _headers, @@ -20281,11 +26997,11 @@ def _list_key_pairs_serialize( _body_params: Optional[bytes] = None # process the path parameters + if project_id is not None: + _path_params["projectId"] = project_id + if region is not None: + _path_params["region"] = region # process the query parameters - if label_selector is not None: - - _query_params.append(("label_selector", label_selector)) - # process the header parameters # process the form parameters # process the body parameter @@ -20299,7 +27015,7 @@ def _list_key_pairs_serialize( return self.api_client.param_serialize( method="GET", - resource_path="/v1/keypairs", + resource_path="/v2beta1/projects/{projectId}/regions/{region}/management-network/routes", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -20313,18 +27029,28 @@ def _list_key_pairs_serialize( ) @validate_call - def list_machine_types( + def list_routes_of_routing_table( self, - project_id: Annotated[ + organization_id: Annotated[ str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), + Field( + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Organization." + ), ], - filter: Annotated[ - Optional[StrictStr], + area_id: Annotated[ + str, Field( - description="Filter resources by fields. A subset of expr-lang is supported. See https://expr-lang.org/docs/language-definition for usage details." + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Network Area." ), - ] = None, + ], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + routing_table_id: Annotated[ + str, + Field( + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Routing Table." + ), + ], + label_selector: Annotated[Optional[StrictStr], Field(description="Filter resources by labels.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -20334,15 +27060,21 @@ def list_machine_types( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> MachineTypeListResponse: - """List all machine types available for a project. + ) -> RouteListResponse: + """List all routes in a routing table. - Get a list of all machine type available in a project. + Get a list of all routes in a routing table. - :param project_id: The identifier (ID) of a STACKIT Project. (required) - :type project_id: str - :param filter: Filter resources by fields. A subset of expr-lang is supported. See https://expr-lang.org/docs/language-definition for usage details. - :type filter: str + :param organization_id: The identifier (ID) of a STACKIT Organization. (required) + :type organization_id: str + :param area_id: The identifier (ID) of a STACKIT Network Area. (required) + :type area_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param routing_table_id: The identifier (ID) of a STACKIT Routing Table. (required) + :type routing_table_id: str + :param label_selector: Filter resources by labels. + :type label_selector: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -20365,9 +27097,12 @@ def list_machine_types( :return: Returns the result object. """ # noqa: E501 - _param = self._list_machine_types_serialize( - project_id=project_id, - filter=filter, + _param = self._list_routes_of_routing_table_serialize( + organization_id=organization_id, + area_id=area_id, + region=region, + routing_table_id=routing_table_id, + label_selector=label_selector, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -20375,7 +27110,7 @@ def list_machine_types( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "MachineTypeListResponse", + "200": "RouteListResponse", "400": "Error", "401": "Error", "403": "Error", @@ -20390,18 +27125,28 @@ def list_machine_types( ).data @validate_call - def list_machine_types_with_http_info( + def list_routes_of_routing_table_with_http_info( self, - project_id: Annotated[ + organization_id: Annotated[ str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), + Field( + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Organization." + ), ], - filter: Annotated[ - Optional[StrictStr], + area_id: Annotated[ + str, Field( - description="Filter resources by fields. A subset of expr-lang is supported. See https://expr-lang.org/docs/language-definition for usage details." + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Network Area." ), - ] = None, + ], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + routing_table_id: Annotated[ + str, + Field( + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Routing Table." + ), + ], + label_selector: Annotated[Optional[StrictStr], Field(description="Filter resources by labels.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -20411,15 +27156,21 @@ def list_machine_types_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[MachineTypeListResponse]: - """List all machine types available for a project. + ) -> ApiResponse[RouteListResponse]: + """List all routes in a routing table. - Get a list of all machine type available in a project. + Get a list of all routes in a routing table. - :param project_id: The identifier (ID) of a STACKIT Project. (required) - :type project_id: str - :param filter: Filter resources by fields. A subset of expr-lang is supported. See https://expr-lang.org/docs/language-definition for usage details. - :type filter: str + :param organization_id: The identifier (ID) of a STACKIT Organization. (required) + :type organization_id: str + :param area_id: The identifier (ID) of a STACKIT Network Area. (required) + :type area_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param routing_table_id: The identifier (ID) of a STACKIT Routing Table. (required) + :type routing_table_id: str + :param label_selector: Filter resources by labels. + :type label_selector: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -20442,9 +27193,12 @@ def list_machine_types_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._list_machine_types_serialize( - project_id=project_id, - filter=filter, + _param = self._list_routes_of_routing_table_serialize( + organization_id=organization_id, + area_id=area_id, + region=region, + routing_table_id=routing_table_id, + label_selector=label_selector, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -20452,7 +27206,7 @@ def list_machine_types_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "MachineTypeListResponse", + "200": "RouteListResponse", "400": "Error", "401": "Error", "403": "Error", @@ -20467,18 +27221,28 @@ def list_machine_types_with_http_info( ) @validate_call - def list_machine_types_without_preload_content( + def list_routes_of_routing_table_without_preload_content( self, - project_id: Annotated[ + organization_id: Annotated[ str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), + Field( + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Organization." + ), ], - filter: Annotated[ - Optional[StrictStr], + area_id: Annotated[ + str, Field( - description="Filter resources by fields. A subset of expr-lang is supported. See https://expr-lang.org/docs/language-definition for usage details." + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Network Area." ), - ] = None, + ], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + routing_table_id: Annotated[ + str, + Field( + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Routing Table." + ), + ], + label_selector: Annotated[Optional[StrictStr], Field(description="Filter resources by labels.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -20489,14 +27253,20 @@ def list_machine_types_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """List all machine types available for a project. + """List all routes in a routing table. - Get a list of all machine type available in a project. + Get a list of all routes in a routing table. - :param project_id: The identifier (ID) of a STACKIT Project. (required) - :type project_id: str - :param filter: Filter resources by fields. A subset of expr-lang is supported. See https://expr-lang.org/docs/language-definition for usage details. - :type filter: str + :param organization_id: The identifier (ID) of a STACKIT Organization. (required) + :type organization_id: str + :param area_id: The identifier (ID) of a STACKIT Network Area. (required) + :type area_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param routing_table_id: The identifier (ID) of a STACKIT Routing Table. (required) + :type routing_table_id: str + :param label_selector: Filter resources by labels. + :type label_selector: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -20519,9 +27289,12 @@ def list_machine_types_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._list_machine_types_serialize( - project_id=project_id, - filter=filter, + _param = self._list_routes_of_routing_table_serialize( + organization_id=organization_id, + area_id=area_id, + region=region, + routing_table_id=routing_table_id, + label_selector=label_selector, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -20529,7 +27302,7 @@ def list_machine_types_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "MachineTypeListResponse", + "200": "RouteListResponse", "400": "Error", "401": "Error", "403": "Error", @@ -20539,10 +27312,13 @@ def list_machine_types_without_preload_content( response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _list_machine_types_serialize( + def _list_routes_of_routing_table_serialize( self, - project_id, - filter, + organization_id, + area_id, + region, + routing_table_id, + label_selector, _request_auth, _content_type, _headers, @@ -20561,12 +27337,18 @@ def _list_machine_types_serialize( _body_params: Optional[bytes] = None # process the path parameters - if project_id is not None: - _path_params["projectId"] = project_id + if organization_id is not None: + _path_params["organizationId"] = organization_id + if area_id is not None: + _path_params["areaId"] = area_id + if region is not None: + _path_params["region"] = region + if routing_table_id is not None: + _path_params["routingTableId"] = routing_table_id # process the query parameters - if filter is not None: + if label_selector is not None: - _query_params.append(("filter", filter)) + _query_params.append(("label_selector", label_selector)) # process the header parameters # process the form parameters @@ -20581,7 +27363,7 @@ def _list_machine_types_serialize( return self.api_client.param_serialize( method="GET", - resource_path="/v1/projects/{projectId}/machine-types", + resource_path="/v2beta1/organizations/{organizationId}/network-areas/{areaId}/regions/{region}/routing-tables/{routingTableId}/routes", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -20595,7 +27377,7 @@ def _list_machine_types_serialize( ) @validate_call - def list_network_area_projects( + def list_routing_tables_of_area( self, organization_id: Annotated[ str, @@ -20609,6 +27391,8 @@ def list_network_area_projects( min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Network Area." ), ], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + label_selector: Annotated[Optional[StrictStr], Field(description="Filter resources by labels.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -20618,15 +27402,19 @@ def list_network_area_projects( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ProjectListResponse: - """List all projects using a network area. + ) -> RoutingTableListResponse: + """List all routing tables in a network area. - Get a list of all projects using a network area. + Get a list of all routing tables in a network area. :param organization_id: The identifier (ID) of a STACKIT Organization. (required) :type organization_id: str :param area_id: The identifier (ID) of a STACKIT Network Area. (required) :type area_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param label_selector: Filter resources by labels. + :type label_selector: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -20649,9 +27437,11 @@ def list_network_area_projects( :return: Returns the result object. """ # noqa: E501 - _param = self._list_network_area_projects_serialize( + _param = self._list_routing_tables_of_area_serialize( organization_id=organization_id, area_id=area_id, + region=region, + label_selector=label_selector, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -20659,7 +27449,7 @@ def list_network_area_projects( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ProjectListResponse", + "200": "RoutingTableListResponse", "400": "Error", "401": "Error", "403": "Error", @@ -20674,7 +27464,7 @@ def list_network_area_projects( ).data @validate_call - def list_network_area_projects_with_http_info( + def list_routing_tables_of_area_with_http_info( self, organization_id: Annotated[ str, @@ -20688,6 +27478,8 @@ def list_network_area_projects_with_http_info( min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Network Area." ), ], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + label_selector: Annotated[Optional[StrictStr], Field(description="Filter resources by labels.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -20697,15 +27489,19 @@ def list_network_area_projects_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[ProjectListResponse]: - """List all projects using a network area. + ) -> ApiResponse[RoutingTableListResponse]: + """List all routing tables in a network area. - Get a list of all projects using a network area. + Get a list of all routing tables in a network area. :param organization_id: The identifier (ID) of a STACKIT Organization. (required) :type organization_id: str :param area_id: The identifier (ID) of a STACKIT Network Area. (required) :type area_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param label_selector: Filter resources by labels. + :type label_selector: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -20728,9 +27524,11 @@ def list_network_area_projects_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._list_network_area_projects_serialize( + _param = self._list_routing_tables_of_area_serialize( organization_id=organization_id, area_id=area_id, + region=region, + label_selector=label_selector, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -20738,7 +27536,7 @@ def list_network_area_projects_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ProjectListResponse", + "200": "RoutingTableListResponse", "400": "Error", "401": "Error", "403": "Error", @@ -20753,7 +27551,7 @@ def list_network_area_projects_with_http_info( ) @validate_call - def list_network_area_projects_without_preload_content( + def list_routing_tables_of_area_without_preload_content( self, organization_id: Annotated[ str, @@ -20767,6 +27565,8 @@ def list_network_area_projects_without_preload_content( min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Network Area." ), ], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + label_selector: Annotated[Optional[StrictStr], Field(description="Filter resources by labels.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -20777,14 +27577,18 @@ def list_network_area_projects_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """List all projects using a network area. + """List all routing tables in a network area. - Get a list of all projects using a network area. + Get a list of all routing tables in a network area. :param organization_id: The identifier (ID) of a STACKIT Organization. (required) :type organization_id: str :param area_id: The identifier (ID) of a STACKIT Network Area. (required) :type area_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param label_selector: Filter resources by labels. + :type label_selector: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -20807,9 +27611,11 @@ def list_network_area_projects_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._list_network_area_projects_serialize( + _param = self._list_routing_tables_of_area_serialize( organization_id=organization_id, area_id=area_id, + region=region, + label_selector=label_selector, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -20817,7 +27623,7 @@ def list_network_area_projects_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ProjectListResponse", + "200": "RoutingTableListResponse", "400": "Error", "401": "Error", "403": "Error", @@ -20827,10 +27633,12 @@ def list_network_area_projects_without_preload_content( response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _list_network_area_projects_serialize( + def _list_routing_tables_of_area_serialize( self, organization_id, area_id, + region, + label_selector, _request_auth, _content_type, _headers, @@ -20853,7 +27661,13 @@ def _list_network_area_projects_serialize( _path_params["organizationId"] = organization_id if area_id is not None: _path_params["areaId"] = area_id + if region is not None: + _path_params["region"] = region # process the query parameters + if label_selector is not None: + + _query_params.append(("label_selector", label_selector)) + # process the header parameters # process the form parameters # process the body parameter @@ -20867,7 +27681,7 @@ def _list_network_area_projects_serialize( return self.api_client.param_serialize( method="GET", - resource_path="/v1/organizations/{organizationId}/network-areas/{areaId}/projects", + resource_path="/v2beta1/organizations/{organizationId}/network-areas/{areaId}/regions/{region}/routing-tables", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -20881,18 +27695,20 @@ def _list_network_area_projects_serialize( ) @validate_call - def list_network_area_ranges( + def list_security_group_rules( self, - organization_id: Annotated[ + project_id: Annotated[ str, - Field( - min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Organization." - ), + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - area_id: Annotated[ + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + security_group_id: Annotated[ str, Field( - min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Network Area." + min_length=36, + strict=True, + max_length=36, + description="The identifier (ID) of a STACKIT Security Group.", ), ], _request_timeout: Union[ @@ -20904,15 +27720,17 @@ def list_network_area_ranges( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> NetworkRangeListResponse: - """List all network ranges in a network area. + ) -> SecurityGroupRuleListResponse: + """List all rules for a security group. - Get a list of all network ranges in a network area. + Get a list of all rules inside a security group. - :param organization_id: The identifier (ID) of a STACKIT Organization. (required) - :type organization_id: str - :param area_id: The identifier (ID) of a STACKIT Network Area. (required) - :type area_id: str + :param project_id: The identifier (ID) of a STACKIT Project. (required) + :type project_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param security_group_id: The identifier (ID) of a STACKIT Security Group. (required) + :type security_group_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -20935,9 +27753,10 @@ def list_network_area_ranges( :return: Returns the result object. """ # noqa: E501 - _param = self._list_network_area_ranges_serialize( - organization_id=organization_id, - area_id=area_id, + _param = self._list_security_group_rules_serialize( + project_id=project_id, + region=region, + security_group_id=security_group_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -20945,7 +27764,7 @@ def list_network_area_ranges( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "NetworkRangeListResponse", + "200": "SecurityGroupRuleListResponse", "400": "Error", "401": "Error", "403": "Error", @@ -20960,18 +27779,20 @@ def list_network_area_ranges( ).data @validate_call - def list_network_area_ranges_with_http_info( + def list_security_group_rules_with_http_info( self, - organization_id: Annotated[ + project_id: Annotated[ str, - Field( - min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Organization." - ), + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - area_id: Annotated[ + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + security_group_id: Annotated[ str, Field( - min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Network Area." + min_length=36, + strict=True, + max_length=36, + description="The identifier (ID) of a STACKIT Security Group.", ), ], _request_timeout: Union[ @@ -20983,15 +27804,17 @@ def list_network_area_ranges_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[NetworkRangeListResponse]: - """List all network ranges in a network area. + ) -> ApiResponse[SecurityGroupRuleListResponse]: + """List all rules for a security group. - Get a list of all network ranges in a network area. + Get a list of all rules inside a security group. - :param organization_id: The identifier (ID) of a STACKIT Organization. (required) - :type organization_id: str - :param area_id: The identifier (ID) of a STACKIT Network Area. (required) - :type area_id: str + :param project_id: The identifier (ID) of a STACKIT Project. (required) + :type project_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param security_group_id: The identifier (ID) of a STACKIT Security Group. (required) + :type security_group_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -21014,9 +27837,10 @@ def list_network_area_ranges_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._list_network_area_ranges_serialize( - organization_id=organization_id, - area_id=area_id, + _param = self._list_security_group_rules_serialize( + project_id=project_id, + region=region, + security_group_id=security_group_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -21024,7 +27848,7 @@ def list_network_area_ranges_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "NetworkRangeListResponse", + "200": "SecurityGroupRuleListResponse", "400": "Error", "401": "Error", "403": "Error", @@ -21039,18 +27863,20 @@ def list_network_area_ranges_with_http_info( ) @validate_call - def list_network_area_ranges_without_preload_content( + def list_security_group_rules_without_preload_content( self, - organization_id: Annotated[ + project_id: Annotated[ str, - Field( - min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Organization." - ), + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - area_id: Annotated[ + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + security_group_id: Annotated[ str, Field( - min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Network Area." + min_length=36, + strict=True, + max_length=36, + description="The identifier (ID) of a STACKIT Security Group.", ), ], _request_timeout: Union[ @@ -21063,14 +27889,16 @@ def list_network_area_ranges_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """List all network ranges in a network area. + """List all rules for a security group. - Get a list of all network ranges in a network area. + Get a list of all rules inside a security group. - :param organization_id: The identifier (ID) of a STACKIT Organization. (required) - :type organization_id: str - :param area_id: The identifier (ID) of a STACKIT Network Area. (required) - :type area_id: str + :param project_id: The identifier (ID) of a STACKIT Project. (required) + :type project_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param security_group_id: The identifier (ID) of a STACKIT Security Group. (required) + :type security_group_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -21093,9 +27921,10 @@ def list_network_area_ranges_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._list_network_area_ranges_serialize( - organization_id=organization_id, - area_id=area_id, + _param = self._list_security_group_rules_serialize( + project_id=project_id, + region=region, + security_group_id=security_group_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -21103,7 +27932,7 @@ def list_network_area_ranges_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "NetworkRangeListResponse", + "200": "SecurityGroupRuleListResponse", "400": "Error", "401": "Error", "403": "Error", @@ -21113,10 +27942,11 @@ def list_network_area_ranges_without_preload_content( response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _list_network_area_ranges_serialize( + def _list_security_group_rules_serialize( self, - organization_id, - area_id, + project_id, + region, + security_group_id, _request_auth, _content_type, _headers, @@ -21135,10 +27965,12 @@ def _list_network_area_ranges_serialize( _body_params: Optional[bytes] = None # process the path parameters - if organization_id is not None: - _path_params["organizationId"] = organization_id - if area_id is not None: - _path_params["areaId"] = area_id + if project_id is not None: + _path_params["projectId"] = project_id + if region is not None: + _path_params["region"] = region + if security_group_id is not None: + _path_params["securityGroupId"] = security_group_id # process the query parameters # process the header parameters # process the form parameters @@ -21153,7 +27985,7 @@ def _list_network_area_ranges_serialize( return self.api_client.param_serialize( method="GET", - resource_path="/v1/organizations/{organizationId}/network-areas/{areaId}/network-ranges", + resource_path="/v2beta1/projects/{projectId}/regions/{region}/security-groups/{securityGroupId}/rules", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -21167,20 +27999,13 @@ def _list_network_area_ranges_serialize( ) @validate_call - def list_network_area_routes( + def list_security_groups( self, - organization_id: Annotated[ - str, - Field( - min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Organization." - ), - ], - area_id: Annotated[ + project_id: Annotated[ str, - Field( - min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Network Area." - ), + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], label_selector: Annotated[Optional[StrictStr], Field(description="Filter resources by labels.")] = None, _request_timeout: Union[ None, @@ -21191,15 +28016,15 @@ def list_network_area_routes( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RouteListResponse: - """List all network routes in a network area. + ) -> SecurityGroupListResponse: + """List all security groups inside a project. - Get a list of all network routes defined in a network area. + Get a list of all security groups inside a project. - :param organization_id: The identifier (ID) of a STACKIT Organization. (required) - :type organization_id: str - :param area_id: The identifier (ID) of a STACKIT Network Area. (required) - :type area_id: str + :param project_id: The identifier (ID) of a STACKIT Project. (required) + :type project_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str :param label_selector: Filter resources by labels. :type label_selector: str :param _request_timeout: timeout setting for this request. If one @@ -21224,9 +28049,9 @@ def list_network_area_routes( :return: Returns the result object. """ # noqa: E501 - _param = self._list_network_area_routes_serialize( - organization_id=organization_id, - area_id=area_id, + _param = self._list_security_groups_serialize( + project_id=project_id, + region=region, label_selector=label_selector, _request_auth=_request_auth, _content_type=_content_type, @@ -21235,7 +28060,7 @@ def list_network_area_routes( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "RouteListResponse", + "200": "SecurityGroupListResponse", "400": "Error", "401": "Error", "403": "Error", @@ -21250,20 +28075,13 @@ def list_network_area_routes( ).data @validate_call - def list_network_area_routes_with_http_info( + def list_security_groups_with_http_info( self, - organization_id: Annotated[ - str, - Field( - min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Organization." - ), - ], - area_id: Annotated[ + project_id: Annotated[ str, - Field( - min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Network Area." - ), + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], label_selector: Annotated[Optional[StrictStr], Field(description="Filter resources by labels.")] = None, _request_timeout: Union[ None, @@ -21274,15 +28092,15 @@ def list_network_area_routes_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[RouteListResponse]: - """List all network routes in a network area. + ) -> ApiResponse[SecurityGroupListResponse]: + """List all security groups inside a project. - Get a list of all network routes defined in a network area. + Get a list of all security groups inside a project. - :param organization_id: The identifier (ID) of a STACKIT Organization. (required) - :type organization_id: str - :param area_id: The identifier (ID) of a STACKIT Network Area. (required) - :type area_id: str + :param project_id: The identifier (ID) of a STACKIT Project. (required) + :type project_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str :param label_selector: Filter resources by labels. :type label_selector: str :param _request_timeout: timeout setting for this request. If one @@ -21307,9 +28125,9 @@ def list_network_area_routes_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._list_network_area_routes_serialize( - organization_id=organization_id, - area_id=area_id, + _param = self._list_security_groups_serialize( + project_id=project_id, + region=region, label_selector=label_selector, _request_auth=_request_auth, _content_type=_content_type, @@ -21318,7 +28136,7 @@ def list_network_area_routes_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "RouteListResponse", + "200": "SecurityGroupListResponse", "400": "Error", "401": "Error", "403": "Error", @@ -21333,20 +28151,13 @@ def list_network_area_routes_with_http_info( ) @validate_call - def list_network_area_routes_without_preload_content( + def list_security_groups_without_preload_content( self, - organization_id: Annotated[ - str, - Field( - min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Organization." - ), - ], - area_id: Annotated[ + project_id: Annotated[ str, - Field( - min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Network Area." - ), + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], label_selector: Annotated[Optional[StrictStr], Field(description="Filter resources by labels.")] = None, _request_timeout: Union[ None, @@ -21358,14 +28169,14 @@ def list_network_area_routes_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """List all network routes in a network area. + """List all security groups inside a project. - Get a list of all network routes defined in a network area. + Get a list of all security groups inside a project. - :param organization_id: The identifier (ID) of a STACKIT Organization. (required) - :type organization_id: str - :param area_id: The identifier (ID) of a STACKIT Network Area. (required) - :type area_id: str + :param project_id: The identifier (ID) of a STACKIT Project. (required) + :type project_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str :param label_selector: Filter resources by labels. :type label_selector: str :param _request_timeout: timeout setting for this request. If one @@ -21390,9 +28201,9 @@ def list_network_area_routes_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._list_network_area_routes_serialize( - organization_id=organization_id, - area_id=area_id, + _param = self._list_security_groups_serialize( + project_id=project_id, + region=region, label_selector=label_selector, _request_auth=_request_auth, _content_type=_content_type, @@ -21401,7 +28212,7 @@ def list_network_area_routes_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "RouteListResponse", + "200": "SecurityGroupListResponse", "400": "Error", "401": "Error", "403": "Error", @@ -21411,10 +28222,10 @@ def list_network_area_routes_without_preload_content( response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _list_network_area_routes_serialize( + def _list_security_groups_serialize( self, - organization_id, - area_id, + project_id, + region, label_selector, _request_auth, _content_type, @@ -21434,10 +28245,10 @@ def _list_network_area_routes_serialize( _body_params: Optional[bytes] = None # process the path parameters - if organization_id is not None: - _path_params["organizationId"] = organization_id - if area_id is not None: - _path_params["areaId"] = area_id + if project_id is not None: + _path_params["projectId"] = project_id + if region is not None: + _path_params["region"] = region # process the query parameters if label_selector is not None: @@ -21456,7 +28267,7 @@ def _list_network_area_routes_serialize( return self.api_client.param_serialize( method="GET", - resource_path="/v1/organizations/{organizationId}/network-areas/{areaId}/routes", + resource_path="/v2beta1/projects/{projectId}/regions/{region}/security-groups", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -21470,15 +28281,17 @@ def _list_network_area_routes_serialize( ) @validate_call - def list_network_areas( + def list_server_nics( self, - organization_id: Annotated[ + project_id: Annotated[ str, - Field( - min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Organization." - ), + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), + ], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + server_id: Annotated[ + str, + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Server."), ], - label_selector: Annotated[Optional[StrictStr], Field(description="Filter resources by labels.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -21488,15 +28301,17 @@ def list_network_areas( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> NetworkAreaListResponse: - """List all network areas in an organization. + ) -> NICListResponse: + """Get all network interfaces. - Get a list of all visible network areas defined in an organization. + Get all network interfaces attached to the server. - :param organization_id: The identifier (ID) of a STACKIT Organization. (required) - :type organization_id: str - :param label_selector: Filter resources by labels. - :type label_selector: str + :param project_id: The identifier (ID) of a STACKIT Project. (required) + :type project_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param server_id: The identifier (ID) of a STACKIT Server. (required) + :type server_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -21519,9 +28334,10 @@ def list_network_areas( :return: Returns the result object. """ # noqa: E501 - _param = self._list_network_areas_serialize( - organization_id=organization_id, - label_selector=label_selector, + _param = self._list_server_nics_serialize( + project_id=project_id, + region=region, + server_id=server_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -21529,7 +28345,7 @@ def list_network_areas( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "NetworkAreaListResponse", + "200": "NICListResponse", "400": "Error", "401": "Error", "403": "Error", @@ -21544,15 +28360,17 @@ def list_network_areas( ).data @validate_call - def list_network_areas_with_http_info( + def list_server_nics_with_http_info( self, - organization_id: Annotated[ + project_id: Annotated[ str, - Field( - min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Organization." - ), + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), + ], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + server_id: Annotated[ + str, + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Server."), ], - label_selector: Annotated[Optional[StrictStr], Field(description="Filter resources by labels.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -21562,15 +28380,17 @@ def list_network_areas_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[NetworkAreaListResponse]: - """List all network areas in an organization. + ) -> ApiResponse[NICListResponse]: + """Get all network interfaces. - Get a list of all visible network areas defined in an organization. + Get all network interfaces attached to the server. - :param organization_id: The identifier (ID) of a STACKIT Organization. (required) - :type organization_id: str - :param label_selector: Filter resources by labels. - :type label_selector: str + :param project_id: The identifier (ID) of a STACKIT Project. (required) + :type project_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param server_id: The identifier (ID) of a STACKIT Server. (required) + :type server_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -21593,9 +28413,10 @@ def list_network_areas_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._list_network_areas_serialize( - organization_id=organization_id, - label_selector=label_selector, + _param = self._list_server_nics_serialize( + project_id=project_id, + region=region, + server_id=server_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -21603,7 +28424,7 @@ def list_network_areas_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "NetworkAreaListResponse", + "200": "NICListResponse", "400": "Error", "401": "Error", "403": "Error", @@ -21618,15 +28439,17 @@ def list_network_areas_with_http_info( ) @validate_call - def list_network_areas_without_preload_content( + def list_server_nics_without_preload_content( self, - organization_id: Annotated[ + project_id: Annotated[ str, - Field( - min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Organization." - ), + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), + ], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + server_id: Annotated[ + str, + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Server."), ], - label_selector: Annotated[Optional[StrictStr], Field(description="Filter resources by labels.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -21637,14 +28460,16 @@ def list_network_areas_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """List all network areas in an organization. + """Get all network interfaces. - Get a list of all visible network areas defined in an organization. + Get all network interfaces attached to the server. - :param organization_id: The identifier (ID) of a STACKIT Organization. (required) - :type organization_id: str - :param label_selector: Filter resources by labels. - :type label_selector: str + :param project_id: The identifier (ID) of a STACKIT Project. (required) + :type project_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param server_id: The identifier (ID) of a STACKIT Server. (required) + :type server_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -21667,9 +28492,10 @@ def list_network_areas_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._list_network_areas_serialize( - organization_id=organization_id, - label_selector=label_selector, + _param = self._list_server_nics_serialize( + project_id=project_id, + region=region, + server_id=server_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -21677,7 +28503,7 @@ def list_network_areas_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "NetworkAreaListResponse", + "200": "NICListResponse", "400": "Error", "401": "Error", "403": "Error", @@ -21687,10 +28513,11 @@ def list_network_areas_without_preload_content( response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _list_network_areas_serialize( + def _list_server_nics_serialize( self, - organization_id, - label_selector, + project_id, + region, + server_id, _request_auth, _content_type, _headers, @@ -21709,13 +28536,13 @@ def _list_network_areas_serialize( _body_params: Optional[bytes] = None # process the path parameters - if organization_id is not None: - _path_params["organizationId"] = organization_id + if project_id is not None: + _path_params["projectId"] = project_id + if region is not None: + _path_params["region"] = region + if server_id is not None: + _path_params["serverId"] = server_id # process the query parameters - if label_selector is not None: - - _query_params.append(("label_selector", label_selector)) - # process the header parameters # process the form parameters # process the body parameter @@ -21729,7 +28556,7 @@ def _list_network_areas_serialize( return self.api_client.param_serialize( method="GET", - resource_path="/v1/organizations/{organizationId}/network-areas", + resource_path="/v2beta1/projects/{projectId}/regions/{region}/servers/{serverId}/nics", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -21743,13 +28570,17 @@ def _list_network_areas_serialize( ) @validate_call - def list_networks( + def list_server_service_accounts( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - label_selector: Annotated[Optional[StrictStr], Field(description="Filter resources by labels.")] = None, + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + server_id: Annotated[ + str, + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Server."), + ], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -21759,15 +28590,17 @@ def list_networks( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> NetworkListResponse: - """List all networks inside a project. + ) -> ServiceAccountMailListResponse: + """List all service accounts of the Server. - Get a list of all networks inside a project. + Get the list of the service accounts of the server. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str - :param label_selector: Filter resources by labels. - :type label_selector: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param server_id: The identifier (ID) of a STACKIT Server. (required) + :type server_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -21790,9 +28623,10 @@ def list_networks( :return: Returns the result object. """ # noqa: E501 - _param = self._list_networks_serialize( + _param = self._list_server_service_accounts_serialize( project_id=project_id, - label_selector=label_selector, + region=region, + server_id=server_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -21800,7 +28634,7 @@ def list_networks( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "NetworkListResponse", + "200": "ServiceAccountMailListResponse", "400": "Error", "401": "Error", "403": "Error", @@ -21815,13 +28649,17 @@ def list_networks( ).data @validate_call - def list_networks_with_http_info( + def list_server_service_accounts_with_http_info( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - label_selector: Annotated[Optional[StrictStr], Field(description="Filter resources by labels.")] = None, + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + server_id: Annotated[ + str, + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Server."), + ], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -21831,15 +28669,17 @@ def list_networks_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[NetworkListResponse]: - """List all networks inside a project. + ) -> ApiResponse[ServiceAccountMailListResponse]: + """List all service accounts of the Server. - Get a list of all networks inside a project. + Get the list of the service accounts of the server. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str - :param label_selector: Filter resources by labels. - :type label_selector: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param server_id: The identifier (ID) of a STACKIT Server. (required) + :type server_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -21862,9 +28702,10 @@ def list_networks_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._list_networks_serialize( + _param = self._list_server_service_accounts_serialize( project_id=project_id, - label_selector=label_selector, + region=region, + server_id=server_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -21872,7 +28713,7 @@ def list_networks_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "NetworkListResponse", + "200": "ServiceAccountMailListResponse", "400": "Error", "401": "Error", "403": "Error", @@ -21887,13 +28728,17 @@ def list_networks_with_http_info( ) @validate_call - def list_networks_without_preload_content( + def list_server_service_accounts_without_preload_content( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - label_selector: Annotated[Optional[StrictStr], Field(description="Filter resources by labels.")] = None, + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + server_id: Annotated[ + str, + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Server."), + ], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -21904,14 +28749,16 @@ def list_networks_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """List all networks inside a project. + """List all service accounts of the Server. - Get a list of all networks inside a project. + Get the list of the service accounts of the server. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str - :param label_selector: Filter resources by labels. - :type label_selector: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param server_id: The identifier (ID) of a STACKIT Server. (required) + :type server_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -21934,9 +28781,10 @@ def list_networks_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._list_networks_serialize( + _param = self._list_server_service_accounts_serialize( project_id=project_id, - label_selector=label_selector, + region=region, + server_id=server_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -21944,7 +28792,7 @@ def list_networks_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "NetworkListResponse", + "200": "ServiceAccountMailListResponse", "400": "Error", "401": "Error", "403": "Error", @@ -21954,10 +28802,11 @@ def list_networks_without_preload_content( response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _list_networks_serialize( + def _list_server_service_accounts_serialize( self, project_id, - label_selector, + region, + server_id, _request_auth, _content_type, _headers, @@ -21978,11 +28827,11 @@ def _list_networks_serialize( # process the path parameters if project_id is not None: _path_params["projectId"] = project_id + if region is not None: + _path_params["region"] = region + if server_id is not None: + _path_params["serverId"] = server_id # process the query parameters - if label_selector is not None: - - _query_params.append(("label_selector", label_selector)) - # process the header parameters # process the form parameters # process the body parameter @@ -21996,7 +28845,7 @@ def _list_networks_serialize( return self.api_client.param_serialize( method="GET", - resource_path="/v1/projects/{projectId}/networks", + resource_path="/v2beta1/projects/{projectId}/regions/{region}/servers/{serverId}/service-accounts", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -22010,16 +28859,14 @@ def _list_networks_serialize( ) @validate_call - def list_nics( + def list_servers( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - network_id: Annotated[ - str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Network."), - ], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + details: Annotated[Optional[StrictBool], Field(description="Show detailed information about server.")] = None, label_selector: Annotated[Optional[StrictStr], Field(description="Filter resources by labels.")] = None, _request_timeout: Union[ None, @@ -22030,15 +28877,17 @@ def list_nics( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> NICListResponse: - """List all network interfaces inside a network. + ) -> ServerListResponse: + """List all servers inside a project. - Get a list of all network interfaces inside a network. + Get a list of all servers inside a project. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str - :param network_id: The identifier (ID) of a STACKIT Network. (required) - :type network_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param details: Show detailed information about server. + :type details: bool :param label_selector: Filter resources by labels. :type label_selector: str :param _request_timeout: timeout setting for this request. If one @@ -22063,9 +28912,10 @@ def list_nics( :return: Returns the result object. """ # noqa: E501 - _param = self._list_nics_serialize( + _param = self._list_servers_serialize( project_id=project_id, - network_id=network_id, + region=region, + details=details, label_selector=label_selector, _request_auth=_request_auth, _content_type=_content_type, @@ -22074,7 +28924,7 @@ def list_nics( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "NICListResponse", + "200": "ServerListResponse", "400": "Error", "401": "Error", "403": "Error", @@ -22089,16 +28939,14 @@ def list_nics( ).data @validate_call - def list_nics_with_http_info( + def list_servers_with_http_info( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - network_id: Annotated[ - str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Network."), - ], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + details: Annotated[Optional[StrictBool], Field(description="Show detailed information about server.")] = None, label_selector: Annotated[Optional[StrictStr], Field(description="Filter resources by labels.")] = None, _request_timeout: Union[ None, @@ -22109,15 +28957,17 @@ def list_nics_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[NICListResponse]: - """List all network interfaces inside a network. + ) -> ApiResponse[ServerListResponse]: + """List all servers inside a project. - Get a list of all network interfaces inside a network. + Get a list of all servers inside a project. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str - :param network_id: The identifier (ID) of a STACKIT Network. (required) - :type network_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param details: Show detailed information about server. + :type details: bool :param label_selector: Filter resources by labels. :type label_selector: str :param _request_timeout: timeout setting for this request. If one @@ -22142,9 +28992,10 @@ def list_nics_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._list_nics_serialize( + _param = self._list_servers_serialize( project_id=project_id, - network_id=network_id, + region=region, + details=details, label_selector=label_selector, _request_auth=_request_auth, _content_type=_content_type, @@ -22153,7 +29004,7 @@ def list_nics_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "NICListResponse", + "200": "ServerListResponse", "400": "Error", "401": "Error", "403": "Error", @@ -22168,16 +29019,14 @@ def list_nics_with_http_info( ) @validate_call - def list_nics_without_preload_content( + def list_servers_without_preload_content( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - network_id: Annotated[ - str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Network."), - ], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + details: Annotated[Optional[StrictBool], Field(description="Show detailed information about server.")] = None, label_selector: Annotated[Optional[StrictStr], Field(description="Filter resources by labels.")] = None, _request_timeout: Union[ None, @@ -22189,14 +29038,16 @@ def list_nics_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """List all network interfaces inside a network. + """List all servers inside a project. - Get a list of all network interfaces inside a network. + Get a list of all servers inside a project. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str - :param network_id: The identifier (ID) of a STACKIT Network. (required) - :type network_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param details: Show detailed information about server. + :type details: bool :param label_selector: Filter resources by labels. :type label_selector: str :param _request_timeout: timeout setting for this request. If one @@ -22221,9 +29072,10 @@ def list_nics_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._list_nics_serialize( + _param = self._list_servers_serialize( project_id=project_id, - network_id=network_id, + region=region, + details=details, label_selector=label_selector, _request_auth=_request_auth, _content_type=_content_type, @@ -22232,7 +29084,7 @@ def list_nics_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "NICListResponse", + "200": "ServerListResponse", "400": "Error", "401": "Error", "403": "Error", @@ -22242,10 +29094,11 @@ def list_nics_without_preload_content( response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _list_nics_serialize( + def _list_servers_serialize( self, project_id, - network_id, + region, + details, label_selector, _request_auth, _content_type, @@ -22267,9 +29120,13 @@ def _list_nics_serialize( # process the path parameters if project_id is not None: _path_params["projectId"] = project_id - if network_id is not None: - _path_params["networkId"] = network_id + if region is not None: + _path_params["region"] = region # process the query parameters + if details is not None: + + _query_params.append(("details", details)) + if label_selector is not None: _query_params.append(("label_selector", label_selector)) @@ -22287,7 +29144,7 @@ def _list_nics_serialize( return self.api_client.param_serialize( method="GET", - resource_path="/v1/projects/{projectId}/networks/{networkId}/nics", + resource_path="/v2beta1/projects/{projectId}/regions/{region}/servers", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -22301,12 +29158,13 @@ def _list_nics_serialize( ) @validate_call - def list_project_nics( + def list_volume_performance_classes( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], label_selector: Annotated[Optional[StrictStr], Field(description="Filter resources by labels.")] = None, _request_timeout: Union[ None, @@ -22317,13 +29175,15 @@ def list_project_nics( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> NICListResponse: - """List all network interfaces inside a project. + ) -> VolumePerformanceClassListResponse: + """List all volume performance classes available for a project. - Get a list of all network interfaces inside a project. + Get a list of all volume performance classes available inside a project. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str :param label_selector: Filter resources by labels. :type label_selector: str :param _request_timeout: timeout setting for this request. If one @@ -22348,8 +29208,9 @@ def list_project_nics( :return: Returns the result object. """ # noqa: E501 - _param = self._list_project_nics_serialize( + _param = self._list_volume_performance_classes_serialize( project_id=project_id, + region=region, label_selector=label_selector, _request_auth=_request_auth, _content_type=_content_type, @@ -22358,7 +29219,7 @@ def list_project_nics( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "NICListResponse", + "200": "VolumePerformanceClassListResponse", "400": "Error", "401": "Error", "403": "Error", @@ -22373,12 +29234,13 @@ def list_project_nics( ).data @validate_call - def list_project_nics_with_http_info( + def list_volume_performance_classes_with_http_info( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], label_selector: Annotated[Optional[StrictStr], Field(description="Filter resources by labels.")] = None, _request_timeout: Union[ None, @@ -22389,13 +29251,15 @@ def list_project_nics_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[NICListResponse]: - """List all network interfaces inside a project. + ) -> ApiResponse[VolumePerformanceClassListResponse]: + """List all volume performance classes available for a project. - Get a list of all network interfaces inside a project. + Get a list of all volume performance classes available inside a project. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str :param label_selector: Filter resources by labels. :type label_selector: str :param _request_timeout: timeout setting for this request. If one @@ -22420,8 +29284,9 @@ def list_project_nics_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._list_project_nics_serialize( + _param = self._list_volume_performance_classes_serialize( project_id=project_id, + region=region, label_selector=label_selector, _request_auth=_request_auth, _content_type=_content_type, @@ -22430,7 +29295,7 @@ def list_project_nics_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "NICListResponse", + "200": "VolumePerformanceClassListResponse", "400": "Error", "401": "Error", "403": "Error", @@ -22445,12 +29310,13 @@ def list_project_nics_with_http_info( ) @validate_call - def list_project_nics_without_preload_content( + def list_volume_performance_classes_without_preload_content( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], label_selector: Annotated[Optional[StrictStr], Field(description="Filter resources by labels.")] = None, _request_timeout: Union[ None, @@ -22462,12 +29328,14 @@ def list_project_nics_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """List all network interfaces inside a project. + """List all volume performance classes available for a project. - Get a list of all network interfaces inside a project. + Get a list of all volume performance classes available inside a project. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str :param label_selector: Filter resources by labels. :type label_selector: str :param _request_timeout: timeout setting for this request. If one @@ -22492,8 +29360,9 @@ def list_project_nics_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._list_project_nics_serialize( + _param = self._list_volume_performance_classes_serialize( project_id=project_id, + region=region, label_selector=label_selector, _request_auth=_request_auth, _content_type=_content_type, @@ -22502,7 +29371,7 @@ def list_project_nics_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "NICListResponse", + "200": "VolumePerformanceClassListResponse", "400": "Error", "401": "Error", "403": "Error", @@ -22512,9 +29381,10 @@ def list_project_nics_without_preload_content( response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _list_project_nics_serialize( + def _list_volume_performance_classes_serialize( self, project_id, + region, label_selector, _request_auth, _content_type, @@ -22536,6 +29406,8 @@ def _list_project_nics_serialize( # process the path parameters if project_id is not None: _path_params["projectId"] = project_id + if region is not None: + _path_params["region"] = region # process the query parameters if label_selector is not None: @@ -22554,7 +29426,7 @@ def _list_project_nics_serialize( return self.api_client.param_serialize( method="GET", - resource_path="/v1/projects/{projectId}/nics", + resource_path="/v2beta1/projects/{projectId}/regions/{region}/volume-performance-classes", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -22568,8 +29440,14 @@ def _list_project_nics_serialize( ) @validate_call - def list_public_ip_ranges( + def list_volumes( self, + project_id: Annotated[ + str, + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), + ], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + label_selector: Annotated[Optional[StrictStr], Field(description="Filter resources by labels.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -22579,11 +29457,17 @@ def list_public_ip_ranges( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> PublicNetworkListResponse: - """List all public IP ranges. + ) -> VolumeListResponse: + """List all volumes inside a project. - Get a list of all public IP ranges that STACKIT uses. + Get a list of all volumes inside a project. + :param project_id: The identifier (ID) of a STACKIT Project. (required) + :type project_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param label_selector: Filter resources by labels. + :type label_selector: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -22606,12 +29490,18 @@ def list_public_ip_ranges( :return: Returns the result object. """ # noqa: E501 - _param = self._list_public_ip_ranges_serialize( - _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + _param = self._list_volumes_serialize( + project_id=project_id, + region=region, + label_selector=label_selector, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - "200": "PublicNetworkListResponse", + "200": "VolumeListResponse", "400": "Error", "401": "Error", "403": "Error", @@ -22626,8 +29516,14 @@ def list_public_ip_ranges( ).data @validate_call - def list_public_ip_ranges_with_http_info( + def list_volumes_with_http_info( self, + project_id: Annotated[ + str, + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), + ], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + label_selector: Annotated[Optional[StrictStr], Field(description="Filter resources by labels.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -22637,11 +29533,17 @@ def list_public_ip_ranges_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[PublicNetworkListResponse]: - """List all public IP ranges. + ) -> ApiResponse[VolumeListResponse]: + """List all volumes inside a project. - Get a list of all public IP ranges that STACKIT uses. + Get a list of all volumes inside a project. + :param project_id: The identifier (ID) of a STACKIT Project. (required) + :type project_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param label_selector: Filter resources by labels. + :type label_selector: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -22664,12 +29566,18 @@ def list_public_ip_ranges_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._list_public_ip_ranges_serialize( - _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + _param = self._list_volumes_serialize( + project_id=project_id, + region=region, + label_selector=label_selector, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - "200": "PublicNetworkListResponse", + "200": "VolumeListResponse", "400": "Error", "401": "Error", "403": "Error", @@ -22684,8 +29592,14 @@ def list_public_ip_ranges_with_http_info( ) @validate_call - def list_public_ip_ranges_without_preload_content( + def list_volumes_without_preload_content( self, + project_id: Annotated[ + str, + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), + ], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + label_selector: Annotated[Optional[StrictStr], Field(description="Filter resources by labels.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -22696,10 +29610,16 @@ def list_public_ip_ranges_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """List all public IP ranges. + """List all volumes inside a project. - Get a list of all public IP ranges that STACKIT uses. + Get a list of all volumes inside a project. + :param project_id: The identifier (ID) of a STACKIT Project. (required) + :type project_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param label_selector: Filter resources by labels. + :type label_selector: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -22722,12 +29642,18 @@ def list_public_ip_ranges_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._list_public_ip_ranges_serialize( - _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index + _param = self._list_volumes_serialize( + project_id=project_id, + region=region, + label_selector=label_selector, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, ) _response_types_map: Dict[str, Optional[str]] = { - "200": "PublicNetworkListResponse", + "200": "VolumeListResponse", "400": "Error", "401": "Error", "403": "Error", @@ -22737,8 +29663,11 @@ def list_public_ip_ranges_without_preload_content( response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _list_public_ip_ranges_serialize( + def _list_volumes_serialize( self, + project_id, + region, + label_selector, _request_auth, _content_type, _headers, @@ -22757,7 +29686,15 @@ def _list_public_ip_ranges_serialize( _body_params: Optional[bytes] = None # process the path parameters + if project_id is not None: + _path_params["projectId"] = project_id + if region is not None: + _path_params["region"] = region # process the query parameters + if label_selector is not None: + + _query_params.append(("label_selector", label_selector)) + # process the header parameters # process the form parameters # process the body parameter @@ -22771,7 +29708,7 @@ def _list_public_ip_ranges_serialize( return self.api_client.param_serialize( method="GET", - resource_path="/v1/networks/public-ip-ranges", + resource_path="/v2beta1/projects/{projectId}/regions/{region}/volumes", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -22785,13 +29722,20 @@ def _list_public_ip_ranges_serialize( ) @validate_call - def list_public_ips( + def partial_update_network( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - label_selector: Annotated[Optional[StrictStr], Field(description="Filter resources by labels.")] = None, + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + network_id: Annotated[ + str, + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Network."), + ], + partial_update_network_payload: Annotated[ + PartialUpdateNetworkPayload, Field(description="Request an update of a network.") + ], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -22801,15 +29745,19 @@ def list_public_ips( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> PublicIpListResponse: - """List all public IPs inside a project. + ) -> None: + """Update network settings. - Get a list of all public IPs inside a project. + Update the settings of a network inside a project. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str - :param label_selector: Filter resources by labels. - :type label_selector: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param network_id: The identifier (ID) of a STACKIT Network. (required) + :type network_id: str + :param partial_update_network_payload: Request an update of a network. (required) + :type partial_update_network_payload: PartialUpdateNetworkPayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -22832,9 +29780,11 @@ def list_public_ips( :return: Returns the result object. """ # noqa: E501 - _param = self._list_public_ips_serialize( + _param = self._partial_update_network_serialize( project_id=project_id, - label_selector=label_selector, + region=region, + network_id=network_id, + partial_update_network_payload=partial_update_network_payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -22842,7 +29792,7 @@ def list_public_ips( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "PublicIpListResponse", + "202": None, "400": "Error", "401": "Error", "403": "Error", @@ -22857,13 +29807,20 @@ def list_public_ips( ).data @validate_call - def list_public_ips_with_http_info( + def partial_update_network_with_http_info( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - label_selector: Annotated[Optional[StrictStr], Field(description="Filter resources by labels.")] = None, + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + network_id: Annotated[ + str, + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Network."), + ], + partial_update_network_payload: Annotated[ + PartialUpdateNetworkPayload, Field(description="Request an update of a network.") + ], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -22873,15 +29830,19 @@ def list_public_ips_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[PublicIpListResponse]: - """List all public IPs inside a project. + ) -> ApiResponse[None]: + """Update network settings. - Get a list of all public IPs inside a project. + Update the settings of a network inside a project. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str - :param label_selector: Filter resources by labels. - :type label_selector: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param network_id: The identifier (ID) of a STACKIT Network. (required) + :type network_id: str + :param partial_update_network_payload: Request an update of a network. (required) + :type partial_update_network_payload: PartialUpdateNetworkPayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -22904,9 +29865,11 @@ def list_public_ips_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._list_public_ips_serialize( + _param = self._partial_update_network_serialize( project_id=project_id, - label_selector=label_selector, + region=region, + network_id=network_id, + partial_update_network_payload=partial_update_network_payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -22914,7 +29877,7 @@ def list_public_ips_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "PublicIpListResponse", + "202": None, "400": "Error", "401": "Error", "403": "Error", @@ -22929,13 +29892,20 @@ def list_public_ips_with_http_info( ) @validate_call - def list_public_ips_without_preload_content( + def partial_update_network_without_preload_content( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - label_selector: Annotated[Optional[StrictStr], Field(description="Filter resources by labels.")] = None, + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + network_id: Annotated[ + str, + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Network."), + ], + partial_update_network_payload: Annotated[ + PartialUpdateNetworkPayload, Field(description="Request an update of a network.") + ], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -22946,14 +29916,18 @@ def list_public_ips_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """List all public IPs inside a project. + """Update network settings. - Get a list of all public IPs inside a project. + Update the settings of a network inside a project. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str - :param label_selector: Filter resources by labels. - :type label_selector: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param network_id: The identifier (ID) of a STACKIT Network. (required) + :type network_id: str + :param partial_update_network_payload: Request an update of a network. (required) + :type partial_update_network_payload: PartialUpdateNetworkPayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -22976,9 +29950,11 @@ def list_public_ips_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._list_public_ips_serialize( + _param = self._partial_update_network_serialize( project_id=project_id, - label_selector=label_selector, + region=region, + network_id=network_id, + partial_update_network_payload=partial_update_network_payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -22986,7 +29962,7 @@ def list_public_ips_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "PublicIpListResponse", + "202": None, "400": "Error", "401": "Error", "403": "Error", @@ -22996,10 +29972,12 @@ def list_public_ips_without_preload_content( response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _list_public_ips_serialize( + def _partial_update_network_serialize( self, project_id, - label_selector, + region, + network_id, + partial_update_network_payload, _request_auth, _content_type, _headers, @@ -23020,25 +29998,35 @@ def _list_public_ips_serialize( # process the path parameters if project_id is not None: _path_params["projectId"] = project_id + if region is not None: + _path_params["region"] = region + if network_id is not None: + _path_params["networkId"] = network_id # process the query parameters - if label_selector is not None: - - _query_params.append(("label_selector", label_selector)) - # process the header parameters # process the form parameters # process the body parameter + if partial_update_network_payload is not None: + _body_params = partial_update_network_payload # set the HTTP header `Accept` if "Accept" not in _header_params: _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + # set the HTTP header `Content-Type` + if _content_type: + _header_params["Content-Type"] = _content_type + else: + _default_content_type = self.api_client.select_header_content_type(["application/json"]) + if _default_content_type is not None: + _header_params["Content-Type"] = _default_content_type + # authentication setting _auth_settings: List[str] = [] return self.api_client.param_serialize( - method="GET", - resource_path="/v1/projects/{projectId}/public-ips", + method="PATCH", + resource_path="/v2beta1/projects/{projectId}/regions/{region}/networks/{networkId}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -23052,11 +30040,22 @@ def _list_public_ips_serialize( ) @validate_call - def list_quotas( + def partial_update_network_area( self, - project_id: Annotated[ + organization_id: Annotated[ str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), + Field( + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Organization." + ), + ], + area_id: Annotated[ + str, + Field( + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Network Area." + ), + ], + partial_update_network_area_payload: Annotated[ + PartialUpdateNetworkAreaPayload, Field(description="Request to update an Area.") ], _request_timeout: Union[ None, @@ -23067,13 +30066,17 @@ def list_quotas( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> QuotaListResponse: - """List project quotas. + ) -> NetworkArea: + """Update network area settings. - List quota limits and usage for project resources. + Update the settings of a network area in an organization. - :param project_id: The identifier (ID) of a STACKIT Project. (required) - :type project_id: str + :param organization_id: The identifier (ID) of a STACKIT Organization. (required) + :type organization_id: str + :param area_id: The identifier (ID) of a STACKIT Network Area. (required) + :type area_id: str + :param partial_update_network_area_payload: Request to update an Area. (required) + :type partial_update_network_area_payload: PartialUpdateNetworkAreaPayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -23096,8 +30099,10 @@ def list_quotas( :return: Returns the result object. """ # noqa: E501 - _param = self._list_quotas_serialize( - project_id=project_id, + _param = self._partial_update_network_area_serialize( + organization_id=organization_id, + area_id=area_id, + partial_update_network_area_payload=partial_update_network_area_payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -23105,7 +30110,7 @@ def list_quotas( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "QuotaListResponse", + "200": "NetworkArea", "400": "Error", "401": "Error", "403": "Error", @@ -23120,11 +30125,22 @@ def list_quotas( ).data @validate_call - def list_quotas_with_http_info( + def partial_update_network_area_with_http_info( self, - project_id: Annotated[ + organization_id: Annotated[ str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), + Field( + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Organization." + ), + ], + area_id: Annotated[ + str, + Field( + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Network Area." + ), + ], + partial_update_network_area_payload: Annotated[ + PartialUpdateNetworkAreaPayload, Field(description="Request to update an Area.") ], _request_timeout: Union[ None, @@ -23135,13 +30151,17 @@ def list_quotas_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[QuotaListResponse]: - """List project quotas. + ) -> ApiResponse[NetworkArea]: + """Update network area settings. - List quota limits and usage for project resources. + Update the settings of a network area in an organization. - :param project_id: The identifier (ID) of a STACKIT Project. (required) - :type project_id: str + :param organization_id: The identifier (ID) of a STACKIT Organization. (required) + :type organization_id: str + :param area_id: The identifier (ID) of a STACKIT Network Area. (required) + :type area_id: str + :param partial_update_network_area_payload: Request to update an Area. (required) + :type partial_update_network_area_payload: PartialUpdateNetworkAreaPayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -23164,8 +30184,10 @@ def list_quotas_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._list_quotas_serialize( - project_id=project_id, + _param = self._partial_update_network_area_serialize( + organization_id=organization_id, + area_id=area_id, + partial_update_network_area_payload=partial_update_network_area_payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -23173,7 +30195,7 @@ def list_quotas_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "QuotaListResponse", + "200": "NetworkArea", "400": "Error", "401": "Error", "403": "Error", @@ -23188,11 +30210,22 @@ def list_quotas_with_http_info( ) @validate_call - def list_quotas_without_preload_content( + def partial_update_network_area_without_preload_content( self, - project_id: Annotated[ + organization_id: Annotated[ str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), + Field( + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Organization." + ), + ], + area_id: Annotated[ + str, + Field( + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Network Area." + ), + ], + partial_update_network_area_payload: Annotated[ + PartialUpdateNetworkAreaPayload, Field(description="Request to update an Area.") ], _request_timeout: Union[ None, @@ -23204,12 +30237,16 @@ def list_quotas_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """List project quotas. + """Update network area settings. - List quota limits and usage for project resources. + Update the settings of a network area in an organization. - :param project_id: The identifier (ID) of a STACKIT Project. (required) - :type project_id: str + :param organization_id: The identifier (ID) of a STACKIT Organization. (required) + :type organization_id: str + :param area_id: The identifier (ID) of a STACKIT Network Area. (required) + :type area_id: str + :param partial_update_network_area_payload: Request to update an Area. (required) + :type partial_update_network_area_payload: PartialUpdateNetworkAreaPayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -23232,8 +30269,10 @@ def list_quotas_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._list_quotas_serialize( - project_id=project_id, + _param = self._partial_update_network_area_serialize( + organization_id=organization_id, + area_id=area_id, + partial_update_network_area_payload=partial_update_network_area_payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -23241,7 +30280,7 @@ def list_quotas_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "QuotaListResponse", + "200": "NetworkArea", "400": "Error", "401": "Error", "403": "Error", @@ -23251,9 +30290,11 @@ def list_quotas_without_preload_content( response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _list_quotas_serialize( + def _partial_update_network_area_serialize( self, - project_id, + organization_id, + area_id, + partial_update_network_area_payload, _request_auth, _content_type, _headers, @@ -23272,23 +30313,35 @@ def _list_quotas_serialize( _body_params: Optional[bytes] = None # process the path parameters - if project_id is not None: - _path_params["projectId"] = project_id + if organization_id is not None: + _path_params["organizationId"] = organization_id + if area_id is not None: + _path_params["areaId"] = area_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + if partial_update_network_area_payload is not None: + _body_params = partial_update_network_area_payload # set the HTTP header `Accept` if "Accept" not in _header_params: _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + # set the HTTP header `Content-Type` + if _content_type: + _header_params["Content-Type"] = _content_type + else: + _default_content_type = self.api_client.select_header_content_type(["application/json"]) + if _default_content_type is not None: + _header_params["Content-Type"] = _default_content_type + # authentication setting _auth_settings: List[str] = [] return self.api_client.param_serialize( - method="GET", - resource_path="/v1/projects/{projectId}/quotas", + method="PATCH", + resource_path="/v2beta1/organizations/{organizationId}/network-areas/{areaId}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -23302,21 +30355,18 @@ def _list_quotas_serialize( ) @validate_call - def list_security_group_rules( + def reboot_server( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - security_group_id: Annotated[ + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + server_id: Annotated[ str, - Field( - min_length=36, - strict=True, - max_length=36, - description="The identifier (ID) of a STACKIT Security Group.", - ), + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Server."), ], + action: Annotated[Optional[StrictStr], Field(description="Defines if it is a soft or a hard reboot.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -23326,15 +30376,19 @@ def list_security_group_rules( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> SecurityGroupRuleListResponse: - """List all rules for a security group. + ) -> None: + """Reboot the server. - Get a list of all rules inside a security group. + Reboot the server. A soft reboot will attempt to gracefully shut down the server by passing the command to the operating system. A hard reboot will power cycle the server without waiting for the operating system to shutdown properly. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str - :param security_group_id: The identifier (ID) of a STACKIT Security Group. (required) - :type security_group_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param server_id: The identifier (ID) of a STACKIT Server. (required) + :type server_id: str + :param action: Defines if it is a soft or a hard reboot. + :type action: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -23357,9 +30411,11 @@ def list_security_group_rules( :return: Returns the result object. """ # noqa: E501 - _param = self._list_security_group_rules_serialize( + _param = self._reboot_server_serialize( project_id=project_id, - security_group_id=security_group_id, + region=region, + server_id=server_id, + action=action, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -23367,11 +30423,12 @@ def list_security_group_rules( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "SecurityGroupRuleListResponse", + "202": None, "400": "Error", "401": "Error", "403": "Error", "404": "Error", + "409": "Error", "500": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -23382,21 +30439,18 @@ def list_security_group_rules( ).data @validate_call - def list_security_group_rules_with_http_info( + def reboot_server_with_http_info( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - security_group_id: Annotated[ + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + server_id: Annotated[ str, - Field( - min_length=36, - strict=True, - max_length=36, - description="The identifier (ID) of a STACKIT Security Group.", - ), + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Server."), ], + action: Annotated[Optional[StrictStr], Field(description="Defines if it is a soft or a hard reboot.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -23406,15 +30460,19 @@ def list_security_group_rules_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[SecurityGroupRuleListResponse]: - """List all rules for a security group. + ) -> ApiResponse[None]: + """Reboot the server. - Get a list of all rules inside a security group. + Reboot the server. A soft reboot will attempt to gracefully shut down the server by passing the command to the operating system. A hard reboot will power cycle the server without waiting for the operating system to shutdown properly. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str - :param security_group_id: The identifier (ID) of a STACKIT Security Group. (required) - :type security_group_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param server_id: The identifier (ID) of a STACKIT Server. (required) + :type server_id: str + :param action: Defines if it is a soft or a hard reboot. + :type action: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -23437,9 +30495,11 @@ def list_security_group_rules_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._list_security_group_rules_serialize( + _param = self._reboot_server_serialize( project_id=project_id, - security_group_id=security_group_id, + region=region, + server_id=server_id, + action=action, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -23447,11 +30507,12 @@ def list_security_group_rules_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "SecurityGroupRuleListResponse", + "202": None, "400": "Error", "401": "Error", "403": "Error", "404": "Error", + "409": "Error", "500": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -23462,21 +30523,18 @@ def list_security_group_rules_with_http_info( ) @validate_call - def list_security_group_rules_without_preload_content( + def reboot_server_without_preload_content( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - security_group_id: Annotated[ + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + server_id: Annotated[ str, - Field( - min_length=36, - strict=True, - max_length=36, - description="The identifier (ID) of a STACKIT Security Group.", - ), + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Server."), ], + action: Annotated[Optional[StrictStr], Field(description="Defines if it is a soft or a hard reboot.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -23487,14 +30545,18 @@ def list_security_group_rules_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """List all rules for a security group. + """Reboot the server. - Get a list of all rules inside a security group. + Reboot the server. A soft reboot will attempt to gracefully shut down the server by passing the command to the operating system. A hard reboot will power cycle the server without waiting for the operating system to shutdown properly. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str - :param security_group_id: The identifier (ID) of a STACKIT Security Group. (required) - :type security_group_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param server_id: The identifier (ID) of a STACKIT Server. (required) + :type server_id: str + :param action: Defines if it is a soft or a hard reboot. + :type action: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -23517,9 +30579,11 @@ def list_security_group_rules_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._list_security_group_rules_serialize( + _param = self._reboot_server_serialize( project_id=project_id, - security_group_id=security_group_id, + region=region, + server_id=server_id, + action=action, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -23527,20 +30591,23 @@ def list_security_group_rules_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "SecurityGroupRuleListResponse", + "202": None, "400": "Error", "401": "Error", "403": "Error", "404": "Error", + "409": "Error", "500": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _list_security_group_rules_serialize( + def _reboot_server_serialize( self, project_id, - security_group_id, + region, + server_id, + action, _request_auth, _content_type, _headers, @@ -23561,9 +30628,15 @@ def _list_security_group_rules_serialize( # process the path parameters if project_id is not None: _path_params["projectId"] = project_id - if security_group_id is not None: - _path_params["securityGroupId"] = security_group_id + if region is not None: + _path_params["region"] = region + if server_id is not None: + _path_params["serverId"] = server_id # process the query parameters + if action is not None: + + _query_params.append(("action", action)) + # process the header parameters # process the form parameters # process the body parameter @@ -23576,8 +30649,8 @@ def _list_security_group_rules_serialize( _auth_settings: List[str] = [] return self.api_client.param_serialize( - method="GET", - resource_path="/v1/projects/{projectId}/security-groups/{securityGroupId}/rules", + method="POST", + resource_path="/v2beta1/projects/{projectId}/regions/{region}/servers/{serverId}/reboot", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -23591,13 +30664,21 @@ def _list_security_group_rules_serialize( ) @validate_call - def list_security_groups( + def remove_network_from_server( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - label_selector: Annotated[Optional[StrictStr], Field(description="Filter resources by labels.")] = None, + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + server_id: Annotated[ + str, + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Server."), + ], + network_id: Annotated[ + str, + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Network."), + ], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -23607,15 +30688,105 @@ def list_security_groups( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> SecurityGroupListResponse: - """List all security groups inside a project. + ) -> None: + """Detach and delete all network interfaces associated with the specified network. - Get a list of all security groups inside a project. + Detach and delete all network interfaces associated with the specified network from the server. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str - :param label_selector: Filter resources by labels. - :type label_selector: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param server_id: The identifier (ID) of a STACKIT Server. (required) + :type server_id: str + :param network_id: The identifier (ID) of a STACKIT Network. (required) + :type network_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._remove_network_from_server_serialize( + project_id=project_id, + region=region, + server_id=server_id, + network_id=network_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "204": None, + "400": "Error", + "401": "Error", + "403": "Error", + "404": "Error", + "500": "Error", + } + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def remove_network_from_server_with_http_info( + self, + project_id: Annotated[ + str, + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), + ], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + server_id: Annotated[ + str, + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Server."), + ], + network_id: Annotated[ + str, + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Network."), + ], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Detach and delete all network interfaces associated with the specified network. + + Detach and delete all network interfaces associated with the specified network from the server. + + :param project_id: The identifier (ID) of a STACKIT Project. (required) + :type project_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param server_id: The identifier (ID) of a STACKIT Server. (required) + :type server_id: str + :param network_id: The identifier (ID) of a STACKIT Network. (required) + :type network_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -23638,9 +30809,11 @@ def list_security_groups( :return: Returns the result object. """ # noqa: E501 - _param = self._list_security_groups_serialize( + _param = self._remove_network_from_server_serialize( project_id=project_id, - label_selector=label_selector, + region=region, + server_id=server_id, + network_id=network_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -23648,7 +30821,7 @@ def list_security_groups( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "SecurityGroupListResponse", + "204": None, "400": "Error", "401": "Error", "403": "Error", @@ -23660,88 +30833,24 @@ def list_security_groups( return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, - ).data + ) @validate_call - def list_security_groups_with_http_info( + def remove_network_from_server_without_preload_content( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - label_selector: Annotated[Optional[StrictStr], Field(description="Filter resources by labels.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[SecurityGroupListResponse]: - """List all security groups inside a project. - - Get a list of all security groups inside a project. - - :param project_id: The identifier (ID) of a STACKIT Project. (required) - :type project_id: str - :param label_selector: Filter resources by labels. - :type label_selector: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._list_security_groups_serialize( - project_id=project_id, - label_selector=label_selector, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index, - ) - - _response_types_map: Dict[str, Optional[str]] = { - "200": "SecurityGroupListResponse", - "400": "Error", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - } - response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - @validate_call - def list_security_groups_without_preload_content( - self, - project_id: Annotated[ + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + server_id: Annotated[ str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Server."), + ], + network_id: Annotated[ + str, + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Network."), ], - label_selector: Annotated[Optional[StrictStr], Field(description="Filter resources by labels.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -23752,14 +30861,18 @@ def list_security_groups_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """List all security groups inside a project. + """Detach and delete all network interfaces associated with the specified network. - Get a list of all security groups inside a project. + Detach and delete all network interfaces associated with the specified network from the server. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str - :param label_selector: Filter resources by labels. - :type label_selector: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param server_id: The identifier (ID) of a STACKIT Server. (required) + :type server_id: str + :param network_id: The identifier (ID) of a STACKIT Network. (required) + :type network_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -23782,9 +30895,11 @@ def list_security_groups_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._list_security_groups_serialize( + _param = self._remove_network_from_server_serialize( project_id=project_id, - label_selector=label_selector, + region=region, + server_id=server_id, + network_id=network_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -23792,7 +30907,7 @@ def list_security_groups_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "SecurityGroupListResponse", + "204": None, "400": "Error", "401": "Error", "403": "Error", @@ -23802,10 +30917,12 @@ def list_security_groups_without_preload_content( response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _list_security_groups_serialize( + def _remove_network_from_server_serialize( self, project_id, - label_selector, + region, + server_id, + network_id, _request_auth, _content_type, _headers, @@ -23826,11 +30943,13 @@ def _list_security_groups_serialize( # process the path parameters if project_id is not None: _path_params["projectId"] = project_id + if region is not None: + _path_params["region"] = region + if server_id is not None: + _path_params["serverId"] = server_id + if network_id is not None: + _path_params["networkId"] = network_id # process the query parameters - if label_selector is not None: - - _query_params.append(("label_selector", label_selector)) - # process the header parameters # process the form parameters # process the body parameter @@ -23843,8 +30962,8 @@ def _list_security_groups_serialize( _auth_settings: List[str] = [] return self.api_client.param_serialize( - method="GET", - resource_path="/v1/projects/{projectId}/security-groups", + method="DELETE", + resource_path="/v2beta1/projects/{projectId}/regions/{region}/servers/{serverId}/networks/{networkId}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -23858,16 +30977,21 @@ def _list_security_groups_serialize( ) @validate_call - def list_server_nics( + def remove_nic_from_server( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], server_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Server."), ], + nic_id: Annotated[ + str, + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a network interface."), + ], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -23877,15 +31001,19 @@ def list_server_nics( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> NICListResponse: - """Get all network interfaces. + ) -> None: + """Detach a network interface. - Get all network interfaces attached to the server. + Detach a network interface from a server. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str :param server_id: The identifier (ID) of a STACKIT Server. (required) :type server_id: str + :param nic_id: The identifier (ID) of a network interface. (required) + :type nic_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -23908,9 +31036,11 @@ def list_server_nics( :return: Returns the result object. """ # noqa: E501 - _param = self._list_server_nics_serialize( + _param = self._remove_nic_from_server_serialize( project_id=project_id, + region=region, server_id=server_id, + nic_id=nic_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -23918,7 +31048,7 @@ def list_server_nics( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "NICListResponse", + "204": None, "400": "Error", "401": "Error", "403": "Error", @@ -23933,16 +31063,21 @@ def list_server_nics( ).data @validate_call - def list_server_nics_with_http_info( + def remove_nic_from_server_with_http_info( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], server_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Server."), ], + nic_id: Annotated[ + str, + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a network interface."), + ], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -23952,15 +31087,19 @@ def list_server_nics_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[NICListResponse]: - """Get all network interfaces. + ) -> ApiResponse[None]: + """Detach a network interface. - Get all network interfaces attached to the server. + Detach a network interface from a server. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str :param server_id: The identifier (ID) of a STACKIT Server. (required) :type server_id: str + :param nic_id: The identifier (ID) of a network interface. (required) + :type nic_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -23983,9 +31122,11 @@ def list_server_nics_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._list_server_nics_serialize( + _param = self._remove_nic_from_server_serialize( project_id=project_id, + region=region, server_id=server_id, + nic_id=nic_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -23993,7 +31134,7 @@ def list_server_nics_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "NICListResponse", + "204": None, "400": "Error", "401": "Error", "403": "Error", @@ -24008,16 +31149,21 @@ def list_server_nics_with_http_info( ) @validate_call - def list_server_nics_without_preload_content( + def remove_nic_from_server_without_preload_content( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], server_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Server."), ], + nic_id: Annotated[ + str, + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a network interface."), + ], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -24028,14 +31174,18 @@ def list_server_nics_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Get all network interfaces. + """Detach a network interface. - Get all network interfaces attached to the server. + Detach a network interface from a server. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str :param server_id: The identifier (ID) of a STACKIT Server. (required) :type server_id: str + :param nic_id: The identifier (ID) of a network interface. (required) + :type nic_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -24058,9 +31208,11 @@ def list_server_nics_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._list_server_nics_serialize( + _param = self._remove_nic_from_server_serialize( project_id=project_id, + region=region, server_id=server_id, + nic_id=nic_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -24068,7 +31220,7 @@ def list_server_nics_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "NICListResponse", + "204": None, "400": "Error", "401": "Error", "403": "Error", @@ -24078,10 +31230,12 @@ def list_server_nics_without_preload_content( response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _list_server_nics_serialize( + def _remove_nic_from_server_serialize( self, project_id, + region, server_id, + nic_id, _request_auth, _content_type, _headers, @@ -24102,8 +31256,12 @@ def _list_server_nics_serialize( # process the path parameters if project_id is not None: _path_params["projectId"] = project_id + if region is not None: + _path_params["region"] = region if server_id is not None: _path_params["serverId"] = server_id + if nic_id is not None: + _path_params["nicId"] = nic_id # process the query parameters # process the header parameters # process the form parameters @@ -24117,8 +31275,8 @@ def _list_server_nics_serialize( _auth_settings: List[str] = [] return self.api_client.param_serialize( - method="GET", - resource_path="/v1/projects/{projectId}/servers/{serverId}/nics", + method="DELETE", + resource_path="/v2beta1/projects/{projectId}/regions/{region}/servers/{serverId}/nics/{nicId}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -24132,16 +31290,20 @@ def _list_server_nics_serialize( ) @validate_call - def list_server_service_accounts( + def remove_public_ip_from_server( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], server_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Server."), ], + public_ip_id: Annotated[ + str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a Public IP.") + ], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -24151,15 +31313,19 @@ def list_server_service_accounts( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ServiceAccountMailListResponse: - """List all service accounts of the Server. + ) -> None: + """Dissociate a public IP from a server. - Get the list of the service accounts of the server. + Dissociate a public IP on an existing server. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str :param server_id: The identifier (ID) of a STACKIT Server. (required) :type server_id: str + :param public_ip_id: The identifier (ID) of a Public IP. (required) + :type public_ip_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -24182,9 +31348,11 @@ def list_server_service_accounts( :return: Returns the result object. """ # noqa: E501 - _param = self._list_server_service_accounts_serialize( + _param = self._remove_public_ip_from_server_serialize( project_id=project_id, + region=region, server_id=server_id, + public_ip_id=public_ip_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -24192,11 +31360,12 @@ def list_server_service_accounts( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ServiceAccountMailListResponse", + "204": None, "400": "Error", "401": "Error", "403": "Error", "404": "Error", + "409": "Error", "500": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -24207,16 +31376,20 @@ def list_server_service_accounts( ).data @validate_call - def list_server_service_accounts_with_http_info( + def remove_public_ip_from_server_with_http_info( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], server_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Server."), ], + public_ip_id: Annotated[ + str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a Public IP.") + ], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -24226,15 +31399,19 @@ def list_server_service_accounts_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[ServiceAccountMailListResponse]: - """List all service accounts of the Server. + ) -> ApiResponse[None]: + """Dissociate a public IP from a server. - Get the list of the service accounts of the server. + Dissociate a public IP on an existing server. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str :param server_id: The identifier (ID) of a STACKIT Server. (required) :type server_id: str + :param public_ip_id: The identifier (ID) of a Public IP. (required) + :type public_ip_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -24257,9 +31434,11 @@ def list_server_service_accounts_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._list_server_service_accounts_serialize( + _param = self._remove_public_ip_from_server_serialize( project_id=project_id, + region=region, server_id=server_id, + public_ip_id=public_ip_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -24267,11 +31446,12 @@ def list_server_service_accounts_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ServiceAccountMailListResponse", + "204": None, "400": "Error", "401": "Error", "403": "Error", "404": "Error", + "409": "Error", "500": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -24282,16 +31462,20 @@ def list_server_service_accounts_with_http_info( ) @validate_call - def list_server_service_accounts_without_preload_content( + def remove_public_ip_from_server_without_preload_content( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], server_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Server."), ], + public_ip_id: Annotated[ + str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a Public IP.") + ], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -24302,14 +31486,18 @@ def list_server_service_accounts_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """List all service accounts of the Server. + """Dissociate a public IP from a server. - Get the list of the service accounts of the server. + Dissociate a public IP on an existing server. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str :param server_id: The identifier (ID) of a STACKIT Server. (required) :type server_id: str + :param public_ip_id: The identifier (ID) of a Public IP. (required) + :type public_ip_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -24332,9 +31520,11 @@ def list_server_service_accounts_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._list_server_service_accounts_serialize( + _param = self._remove_public_ip_from_server_serialize( project_id=project_id, + region=region, server_id=server_id, + public_ip_id=public_ip_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -24342,20 +31532,23 @@ def list_server_service_accounts_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ServiceAccountMailListResponse", + "204": None, "400": "Error", "401": "Error", "403": "Error", "404": "Error", + "409": "Error", "500": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _list_server_service_accounts_serialize( + def _remove_public_ip_from_server_serialize( self, project_id, + region, server_id, + public_ip_id, _request_auth, _content_type, _headers, @@ -24376,8 +31569,12 @@ def _list_server_service_accounts_serialize( # process the path parameters if project_id is not None: _path_params["projectId"] = project_id + if region is not None: + _path_params["region"] = region if server_id is not None: _path_params["serverId"] = server_id + if public_ip_id is not None: + _path_params["publicIpId"] = public_ip_id # process the query parameters # process the header parameters # process the form parameters @@ -24391,8 +31588,8 @@ def _list_server_service_accounts_serialize( _auth_settings: List[str] = [] return self.api_client.param_serialize( - method="GET", - resource_path="/v1/projects/{projectId}/servers/{serverId}/service-accounts", + method="DELETE", + resource_path="/v2beta1/projects/{projectId}/regions/{region}/servers/{serverId}/public-ips/{publicIpId}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -24406,14 +31603,26 @@ def _list_server_service_accounts_serialize( ) @validate_call - def list_servers( + def remove_security_group_from_server( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - details: Annotated[Optional[StrictBool], Field(description="Show detailed information about server.")] = None, - label_selector: Annotated[Optional[StrictStr], Field(description="Filter resources by labels.")] = None, + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + server_id: Annotated[ + str, + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Server."), + ], + security_group_id: Annotated[ + str, + Field( + min_length=36, + strict=True, + max_length=36, + description="The identifier (ID) of a STACKIT Security Group.", + ), + ], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -24423,17 +31632,19 @@ def list_servers( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ServerListResponse: - """List all servers inside a project. + ) -> None: + """Remove a server from a security group. - Get a list of all servers inside a project. + Remove a server from a attached security group. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str - :param details: Show detailed information about server. - :type details: bool - :param label_selector: Filter resources by labels. - :type label_selector: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param server_id: The identifier (ID) of a STACKIT Server. (required) + :type server_id: str + :param security_group_id: The identifier (ID) of a STACKIT Security Group. (required) + :type security_group_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -24456,10 +31667,11 @@ def list_servers( :return: Returns the result object. """ # noqa: E501 - _param = self._list_servers_serialize( + _param = self._remove_security_group_from_server_serialize( project_id=project_id, - details=details, - label_selector=label_selector, + region=region, + server_id=server_id, + security_group_id=security_group_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -24467,11 +31679,12 @@ def list_servers( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ServerListResponse", + "204": None, "400": "Error", "401": "Error", "403": "Error", "404": "Error", + "409": "Error", "500": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -24482,14 +31695,26 @@ def list_servers( ).data @validate_call - def list_servers_with_http_info( + def remove_security_group_from_server_with_http_info( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - details: Annotated[Optional[StrictBool], Field(description="Show detailed information about server.")] = None, - label_selector: Annotated[Optional[StrictStr], Field(description="Filter resources by labels.")] = None, + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + server_id: Annotated[ + str, + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Server."), + ], + security_group_id: Annotated[ + str, + Field( + min_length=36, + strict=True, + max_length=36, + description="The identifier (ID) of a STACKIT Security Group.", + ), + ], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -24499,17 +31724,19 @@ def list_servers_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[ServerListResponse]: - """List all servers inside a project. + ) -> ApiResponse[None]: + """Remove a server from a security group. - Get a list of all servers inside a project. + Remove a server from a attached security group. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str - :param details: Show detailed information about server. - :type details: bool - :param label_selector: Filter resources by labels. - :type label_selector: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param server_id: The identifier (ID) of a STACKIT Server. (required) + :type server_id: str + :param security_group_id: The identifier (ID) of a STACKIT Security Group. (required) + :type security_group_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -24532,10 +31759,11 @@ def list_servers_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._list_servers_serialize( + _param = self._remove_security_group_from_server_serialize( project_id=project_id, - details=details, - label_selector=label_selector, + region=region, + server_id=server_id, + security_group_id=security_group_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -24543,11 +31771,12 @@ def list_servers_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ServerListResponse", + "204": None, "400": "Error", "401": "Error", "403": "Error", "404": "Error", + "409": "Error", "500": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -24558,14 +31787,26 @@ def list_servers_with_http_info( ) @validate_call - def list_servers_without_preload_content( + def remove_security_group_from_server_without_preload_content( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - details: Annotated[Optional[StrictBool], Field(description="Show detailed information about server.")] = None, - label_selector: Annotated[Optional[StrictStr], Field(description="Filter resources by labels.")] = None, + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + server_id: Annotated[ + str, + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Server."), + ], + security_group_id: Annotated[ + str, + Field( + min_length=36, + strict=True, + max_length=36, + description="The identifier (ID) of a STACKIT Security Group.", + ), + ], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -24576,16 +31817,18 @@ def list_servers_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """List all servers inside a project. + """Remove a server from a security group. - Get a list of all servers inside a project. + Remove a server from a attached security group. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str - :param details: Show detailed information about server. - :type details: bool - :param label_selector: Filter resources by labels. - :type label_selector: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param server_id: The identifier (ID) of a STACKIT Server. (required) + :type server_id: str + :param security_group_id: The identifier (ID) of a STACKIT Security Group. (required) + :type security_group_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -24608,10 +31851,11 @@ def list_servers_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._list_servers_serialize( + _param = self._remove_security_group_from_server_serialize( project_id=project_id, - details=details, - label_selector=label_selector, + region=region, + server_id=server_id, + security_group_id=security_group_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -24619,21 +31863,23 @@ def list_servers_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ServerListResponse", + "204": None, "400": "Error", "401": "Error", "403": "Error", "404": "Error", + "409": "Error", "500": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _list_servers_serialize( + def _remove_security_group_from_server_serialize( self, project_id, - details, - label_selector, + region, + server_id, + security_group_id, _request_auth, _content_type, _headers, @@ -24654,15 +31900,13 @@ def _list_servers_serialize( # process the path parameters if project_id is not None: _path_params["projectId"] = project_id + if region is not None: + _path_params["region"] = region + if server_id is not None: + _path_params["serverId"] = server_id + if security_group_id is not None: + _path_params["securityGroupId"] = security_group_id # process the query parameters - if details is not None: - - _query_params.append(("details", details)) - - if label_selector is not None: - - _query_params.append(("label_selector", label_selector)) - # process the header parameters # process the form parameters # process the body parameter @@ -24675,8 +31919,8 @@ def _list_servers_serialize( _auth_settings: List[str] = [] return self.api_client.param_serialize( - method="GET", - resource_path="/v1/projects/{projectId}/servers", + method="DELETE", + resource_path="/v2beta1/projects/{projectId}/regions/{region}/servers/{serverId}/security-groups/{securityGroupId}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -24690,13 +31934,20 @@ def _list_servers_serialize( ) @validate_call - def list_snapshots( + def remove_service_account_from_server( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - label_selector: Annotated[Optional[StrictStr], Field(description="Filter resources by labels.")] = None, + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + server_id: Annotated[ + str, + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Server."), + ], + service_account_mail: Annotated[ + str, Field(strict=True, max_length=255, description="The e-mail address of a service account.") + ], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -24706,15 +31957,19 @@ def list_snapshots( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> SnapshotListResponse: - """List all snapshots inside a project. + ) -> ServiceAccountMailListResponse: + """Detach a service account from a server. - Get a list of all snapshots inside a project. + Detach an additional service account from the server. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str - :param label_selector: Filter resources by labels. - :type label_selector: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param server_id: The identifier (ID) of a STACKIT Server. (required) + :type server_id: str + :param service_account_mail: The e-mail address of a service account. (required) + :type service_account_mail: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -24737,9 +31992,11 @@ def list_snapshots( :return: Returns the result object. """ # noqa: E501 - _param = self._list_snapshots_serialize( + _param = self._remove_service_account_from_server_serialize( project_id=project_id, - label_selector=label_selector, + region=region, + server_id=server_id, + service_account_mail=service_account_mail, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -24747,11 +32004,12 @@ def list_snapshots( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "SnapshotListResponse", + "200": "ServiceAccountMailListResponse", "400": "Error", "401": "Error", "403": "Error", "404": "Error", + "409": "Error", "500": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -24762,13 +32020,20 @@ def list_snapshots( ).data @validate_call - def list_snapshots_with_http_info( + def remove_service_account_from_server_with_http_info( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - label_selector: Annotated[Optional[StrictStr], Field(description="Filter resources by labels.")] = None, + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + server_id: Annotated[ + str, + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Server."), + ], + service_account_mail: Annotated[ + str, Field(strict=True, max_length=255, description="The e-mail address of a service account.") + ], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -24778,15 +32043,19 @@ def list_snapshots_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[SnapshotListResponse]: - """List all snapshots inside a project. + ) -> ApiResponse[ServiceAccountMailListResponse]: + """Detach a service account from a server. - Get a list of all snapshots inside a project. + Detach an additional service account from the server. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str - :param label_selector: Filter resources by labels. - :type label_selector: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param server_id: The identifier (ID) of a STACKIT Server. (required) + :type server_id: str + :param service_account_mail: The e-mail address of a service account. (required) + :type service_account_mail: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -24809,9 +32078,11 @@ def list_snapshots_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._list_snapshots_serialize( + _param = self._remove_service_account_from_server_serialize( project_id=project_id, - label_selector=label_selector, + region=region, + server_id=server_id, + service_account_mail=service_account_mail, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -24819,11 +32090,12 @@ def list_snapshots_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "SnapshotListResponse", + "200": "ServiceAccountMailListResponse", "400": "Error", "401": "Error", "403": "Error", "404": "Error", + "409": "Error", "500": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -24834,13 +32106,20 @@ def list_snapshots_with_http_info( ) @validate_call - def list_snapshots_without_preload_content( + def remove_service_account_from_server_without_preload_content( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - label_selector: Annotated[Optional[StrictStr], Field(description="Filter resources by labels.")] = None, + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + server_id: Annotated[ + str, + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Server."), + ], + service_account_mail: Annotated[ + str, Field(strict=True, max_length=255, description="The e-mail address of a service account.") + ], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -24851,14 +32130,18 @@ def list_snapshots_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """List all snapshots inside a project. + """Detach a service account from a server. - Get a list of all snapshots inside a project. + Detach an additional service account from the server. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str - :param label_selector: Filter resources by labels. - :type label_selector: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param server_id: The identifier (ID) of a STACKIT Server. (required) + :type server_id: str + :param service_account_mail: The e-mail address of a service account. (required) + :type service_account_mail: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -24881,9 +32164,11 @@ def list_snapshots_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._list_snapshots_serialize( + _param = self._remove_service_account_from_server_serialize( project_id=project_id, - label_selector=label_selector, + region=region, + server_id=server_id, + service_account_mail=service_account_mail, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -24891,20 +32176,23 @@ def list_snapshots_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "SnapshotListResponse", + "200": "ServiceAccountMailListResponse", "400": "Error", "401": "Error", "403": "Error", "404": "Error", + "409": "Error", "500": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _list_snapshots_serialize( + def _remove_service_account_from_server_serialize( self, project_id, - label_selector, + region, + server_id, + service_account_mail, _request_auth, _content_type, _headers, @@ -24925,11 +32213,13 @@ def _list_snapshots_serialize( # process the path parameters if project_id is not None: _path_params["projectId"] = project_id + if region is not None: + _path_params["region"] = region + if server_id is not None: + _path_params["serverId"] = server_id + if service_account_mail is not None: + _path_params["serviceAccountMail"] = service_account_mail # process the query parameters - if label_selector is not None: - - _query_params.append(("label_selector", label_selector)) - # process the header parameters # process the form parameters # process the body parameter @@ -24942,8 +32232,8 @@ def _list_snapshots_serialize( _auth_settings: List[str] = [] return self.api_client.param_serialize( - method="GET", - resource_path="/v1/projects/{projectId}/snapshots", + method="DELETE", + resource_path="/v2beta1/projects/{projectId}/regions/{region}/servers/{serverId}/service-accounts/{serviceAccountMail}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -24957,13 +32247,21 @@ def _list_snapshots_serialize( ) @validate_call - def list_volume_performance_classes( + def remove_volume_from_server( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - label_selector: Annotated[Optional[StrictStr], Field(description="Filter resources by labels.")] = None, + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + server_id: Annotated[ + str, + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Server."), + ], + volume_id: Annotated[ + str, + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Volume."), + ], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -24973,15 +32271,19 @@ def list_volume_performance_classes( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> VolumePerformanceClassListResponse: - """List all volume performance classes available for a project. + ) -> None: + """Detach a volume from a server. - Get a list of all volume performance classes available inside a project. + Detach an existing volume from an existing server. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str - :param label_selector: Filter resources by labels. - :type label_selector: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param server_id: The identifier (ID) of a STACKIT Server. (required) + :type server_id: str + :param volume_id: The identifier (ID) of a STACKIT Volume. (required) + :type volume_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -25004,9 +32306,11 @@ def list_volume_performance_classes( :return: Returns the result object. """ # noqa: E501 - _param = self._list_volume_performance_classes_serialize( + _param = self._remove_volume_from_server_serialize( project_id=project_id, - label_selector=label_selector, + region=region, + server_id=server_id, + volume_id=volume_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -25014,11 +32318,12 @@ def list_volume_performance_classes( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "VolumePerformanceClassListResponse", + "204": None, "400": "Error", "401": "Error", "403": "Error", "404": "Error", + "409": "Error", "500": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -25029,13 +32334,21 @@ def list_volume_performance_classes( ).data @validate_call - def list_volume_performance_classes_with_http_info( + def remove_volume_from_server_with_http_info( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - label_selector: Annotated[Optional[StrictStr], Field(description="Filter resources by labels.")] = None, + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + server_id: Annotated[ + str, + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Server."), + ], + volume_id: Annotated[ + str, + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Volume."), + ], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -25045,15 +32358,19 @@ def list_volume_performance_classes_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[VolumePerformanceClassListResponse]: - """List all volume performance classes available for a project. + ) -> ApiResponse[None]: + """Detach a volume from a server. - Get a list of all volume performance classes available inside a project. + Detach an existing volume from an existing server. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str - :param label_selector: Filter resources by labels. - :type label_selector: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param server_id: The identifier (ID) of a STACKIT Server. (required) + :type server_id: str + :param volume_id: The identifier (ID) of a STACKIT Volume. (required) + :type volume_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -25076,9 +32393,11 @@ def list_volume_performance_classes_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._list_volume_performance_classes_serialize( + _param = self._remove_volume_from_server_serialize( project_id=project_id, - label_selector=label_selector, + region=region, + server_id=server_id, + volume_id=volume_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -25086,11 +32405,12 @@ def list_volume_performance_classes_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "VolumePerformanceClassListResponse", + "204": None, "400": "Error", "401": "Error", "403": "Error", "404": "Error", + "409": "Error", "500": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -25101,13 +32421,21 @@ def list_volume_performance_classes_with_http_info( ) @validate_call - def list_volume_performance_classes_without_preload_content( + def remove_volume_from_server_without_preload_content( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - label_selector: Annotated[Optional[StrictStr], Field(description="Filter resources by labels.")] = None, + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + server_id: Annotated[ + str, + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Server."), + ], + volume_id: Annotated[ + str, + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Volume."), + ], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -25118,14 +32446,18 @@ def list_volume_performance_classes_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """List all volume performance classes available for a project. + """Detach a volume from a server. - Get a list of all volume performance classes available inside a project. + Detach an existing volume from an existing server. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str - :param label_selector: Filter resources by labels. - :type label_selector: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param server_id: The identifier (ID) of a STACKIT Server. (required) + :type server_id: str + :param volume_id: The identifier (ID) of a STACKIT Volume. (required) + :type volume_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -25148,9 +32480,11 @@ def list_volume_performance_classes_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._list_volume_performance_classes_serialize( + _param = self._remove_volume_from_server_serialize( project_id=project_id, - label_selector=label_selector, + region=region, + server_id=server_id, + volume_id=volume_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -25158,20 +32492,23 @@ def list_volume_performance_classes_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "VolumePerformanceClassListResponse", + "204": None, "400": "Error", "401": "Error", "403": "Error", "404": "Error", + "409": "Error", "500": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _list_volume_performance_classes_serialize( + def _remove_volume_from_server_serialize( self, project_id, - label_selector, + region, + server_id, + volume_id, _request_auth, _content_type, _headers, @@ -25192,11 +32529,13 @@ def _list_volume_performance_classes_serialize( # process the path parameters if project_id is not None: _path_params["projectId"] = project_id + if region is not None: + _path_params["region"] = region + if server_id is not None: + _path_params["serverId"] = server_id + if volume_id is not None: + _path_params["volumeId"] = volume_id # process the query parameters - if label_selector is not None: - - _query_params.append(("label_selector", label_selector)) - # process the header parameters # process the form parameters # process the body parameter @@ -25209,8 +32548,8 @@ def _list_volume_performance_classes_serialize( _auth_settings: List[str] = [] return self.api_client.param_serialize( - method="GET", - resource_path="/v1/projects/{projectId}/volume-performance-classes", + method="DELETE", + resource_path="/v2beta1/projects/{projectId}/regions/{region}/servers/{serverId}/volume-attachments/{volumeId}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -25224,13 +32563,18 @@ def _list_volume_performance_classes_serialize( ) @validate_call - def list_volumes( + def rescue_server( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - label_selector: Annotated[Optional[StrictStr], Field(description="Filter resources by labels.")] = None, + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + server_id: Annotated[ + str, + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Server."), + ], + rescue_server_payload: Annotated[RescueServerPayload, Field(description="Request a server rescue.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -25240,15 +32584,19 @@ def list_volumes( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> VolumeListResponse: - """List all volumes inside a project. + ) -> None: + """Rescue an existing server. - Get a list of all volumes inside a project. + Rescue an existing server. It is shutdown and the initial image is attached as the boot volume, while the boot volume is attached as secondary volume and the server is booted. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str - :param label_selector: Filter resources by labels. - :type label_selector: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param server_id: The identifier (ID) of a STACKIT Server. (required) + :type server_id: str + :param rescue_server_payload: Request a server rescue. (required) + :type rescue_server_payload: RescueServerPayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -25271,9 +32619,11 @@ def list_volumes( :return: Returns the result object. """ # noqa: E501 - _param = self._list_volumes_serialize( + _param = self._rescue_server_serialize( project_id=project_id, - label_selector=label_selector, + region=region, + server_id=server_id, + rescue_server_payload=rescue_server_payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -25281,11 +32631,12 @@ def list_volumes( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "VolumeListResponse", + "202": None, "400": "Error", "401": "Error", "403": "Error", "404": "Error", + "409": "Error", "500": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -25296,13 +32647,18 @@ def list_volumes( ).data @validate_call - def list_volumes_with_http_info( + def rescue_server_with_http_info( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - label_selector: Annotated[Optional[StrictStr], Field(description="Filter resources by labels.")] = None, + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + server_id: Annotated[ + str, + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Server."), + ], + rescue_server_payload: Annotated[RescueServerPayload, Field(description="Request a server rescue.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -25312,15 +32668,19 @@ def list_volumes_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[VolumeListResponse]: - """List all volumes inside a project. + ) -> ApiResponse[None]: + """Rescue an existing server. - Get a list of all volumes inside a project. + Rescue an existing server. It is shutdown and the initial image is attached as the boot volume, while the boot volume is attached as secondary volume and the server is booted. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str - :param label_selector: Filter resources by labels. - :type label_selector: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param server_id: The identifier (ID) of a STACKIT Server. (required) + :type server_id: str + :param rescue_server_payload: Request a server rescue. (required) + :type rescue_server_payload: RescueServerPayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -25343,9 +32703,11 @@ def list_volumes_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._list_volumes_serialize( + _param = self._rescue_server_serialize( project_id=project_id, - label_selector=label_selector, + region=region, + server_id=server_id, + rescue_server_payload=rescue_server_payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -25353,11 +32715,12 @@ def list_volumes_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "VolumeListResponse", + "202": None, "400": "Error", "401": "Error", "403": "Error", "404": "Error", + "409": "Error", "500": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -25368,13 +32731,18 @@ def list_volumes_with_http_info( ) @validate_call - def list_volumes_without_preload_content( + def rescue_server_without_preload_content( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - label_selector: Annotated[Optional[StrictStr], Field(description="Filter resources by labels.")] = None, + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + server_id: Annotated[ + str, + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Server."), + ], + rescue_server_payload: Annotated[RescueServerPayload, Field(description="Request a server rescue.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -25385,14 +32753,18 @@ def list_volumes_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """List all volumes inside a project. + """Rescue an existing server. - Get a list of all volumes inside a project. + Rescue an existing server. It is shutdown and the initial image is attached as the boot volume, while the boot volume is attached as secondary volume and the server is booted. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str - :param label_selector: Filter resources by labels. - :type label_selector: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param server_id: The identifier (ID) of a STACKIT Server. (required) + :type server_id: str + :param rescue_server_payload: Request a server rescue. (required) + :type rescue_server_payload: RescueServerPayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -25415,9 +32787,11 @@ def list_volumes_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._list_volumes_serialize( + _param = self._rescue_server_serialize( project_id=project_id, - label_selector=label_selector, + region=region, + server_id=server_id, + rescue_server_payload=rescue_server_payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -25425,20 +32799,23 @@ def list_volumes_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "VolumeListResponse", + "202": None, "400": "Error", "401": "Error", "403": "Error", "404": "Error", + "409": "Error", "500": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _list_volumes_serialize( + def _rescue_server_serialize( self, project_id, - label_selector, + region, + server_id, + rescue_server_payload, _request_auth, _content_type, _headers, @@ -25459,25 +32836,35 @@ def _list_volumes_serialize( # process the path parameters if project_id is not None: _path_params["projectId"] = project_id + if region is not None: + _path_params["region"] = region + if server_id is not None: + _path_params["serverId"] = server_id # process the query parameters - if label_selector is not None: - - _query_params.append(("label_selector", label_selector)) - # process the header parameters # process the form parameters # process the body parameter + if rescue_server_payload is not None: + _body_params = rescue_server_payload # set the HTTP header `Accept` if "Accept" not in _header_params: _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + # set the HTTP header `Content-Type` + if _content_type: + _header_params["Content-Type"] = _content_type + else: + _default_content_type = self.api_client.select_header_content_type(["application/json"]) + if _default_content_type is not None: + _header_params["Content-Type"] = _default_content_type + # authentication setting _auth_settings: List[str] = [] return self.api_client.param_serialize( - method="GET", - resource_path="/v1/projects/{projectId}/volumes", + method="POST", + resource_path="/v2beta1/projects/{projectId}/regions/{region}/servers/{serverId}/rescue", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -25491,19 +32878,18 @@ def _list_volumes_serialize( ) @validate_call - def partial_update_network( + def resize_server( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - network_id: Annotated[ + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + server_id: Annotated[ str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Network."), - ], - partial_update_network_payload: Annotated[ - PartialUpdateNetworkPayload, Field(description="Request an update of a network.") + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Server."), ], + resize_server_payload: Annotated[ResizeServerPayload, Field(description="Request a resize of a server.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -25514,16 +32900,18 @@ def partial_update_network( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> None: - """Update network settings. + """Resize a server. - Update the settings of a network inside a project. + Resize the server to the given machine type. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str - :param network_id: The identifier (ID) of a STACKIT Network. (required) - :type network_id: str - :param partial_update_network_payload: Request an update of a network. (required) - :type partial_update_network_payload: PartialUpdateNetworkPayload + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param server_id: The identifier (ID) of a STACKIT Server. (required) + :type server_id: str + :param resize_server_payload: Request a resize of a server. (required) + :type resize_server_payload: ResizeServerPayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -25546,10 +32934,11 @@ def partial_update_network( :return: Returns the result object. """ # noqa: E501 - _param = self._partial_update_network_serialize( + _param = self._resize_server_serialize( project_id=project_id, - network_id=network_id, - partial_update_network_payload=partial_update_network_payload, + region=region, + server_id=server_id, + resize_server_payload=resize_server_payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -25562,6 +32951,7 @@ def partial_update_network( "401": "Error", "403": "Error", "404": "Error", + "409": "Error", "500": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -25572,19 +32962,18 @@ def partial_update_network( ).data @validate_call - def partial_update_network_with_http_info( + def resize_server_with_http_info( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - network_id: Annotated[ + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + server_id: Annotated[ str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Network."), - ], - partial_update_network_payload: Annotated[ - PartialUpdateNetworkPayload, Field(description="Request an update of a network.") + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Server."), ], + resize_server_payload: Annotated[ResizeServerPayload, Field(description="Request a resize of a server.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -25595,16 +32984,18 @@ def partial_update_network_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[None]: - """Update network settings. + """Resize a server. - Update the settings of a network inside a project. + Resize the server to the given machine type. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str - :param network_id: The identifier (ID) of a STACKIT Network. (required) - :type network_id: str - :param partial_update_network_payload: Request an update of a network. (required) - :type partial_update_network_payload: PartialUpdateNetworkPayload + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param server_id: The identifier (ID) of a STACKIT Server. (required) + :type server_id: str + :param resize_server_payload: Request a resize of a server. (required) + :type resize_server_payload: ResizeServerPayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -25627,10 +33018,11 @@ def partial_update_network_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._partial_update_network_serialize( + _param = self._resize_server_serialize( project_id=project_id, - network_id=network_id, - partial_update_network_payload=partial_update_network_payload, + region=region, + server_id=server_id, + resize_server_payload=resize_server_payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -25643,6 +33035,7 @@ def partial_update_network_with_http_info( "401": "Error", "403": "Error", "404": "Error", + "409": "Error", "500": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -25653,19 +33046,18 @@ def partial_update_network_with_http_info( ) @validate_call - def partial_update_network_without_preload_content( + def resize_server_without_preload_content( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - network_id: Annotated[ + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + server_id: Annotated[ str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Network."), - ], - partial_update_network_payload: Annotated[ - PartialUpdateNetworkPayload, Field(description="Request an update of a network.") + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Server."), ], + resize_server_payload: Annotated[ResizeServerPayload, Field(description="Request a resize of a server.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -25676,16 +33068,18 @@ def partial_update_network_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Update network settings. + """Resize a server. - Update the settings of a network inside a project. + Resize the server to the given machine type. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str - :param network_id: The identifier (ID) of a STACKIT Network. (required) - :type network_id: str - :param partial_update_network_payload: Request an update of a network. (required) - :type partial_update_network_payload: PartialUpdateNetworkPayload + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param server_id: The identifier (ID) of a STACKIT Server. (required) + :type server_id: str + :param resize_server_payload: Request a resize of a server. (required) + :type resize_server_payload: ResizeServerPayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -25708,10 +33102,11 @@ def partial_update_network_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._partial_update_network_serialize( + _param = self._resize_server_serialize( project_id=project_id, - network_id=network_id, - partial_update_network_payload=partial_update_network_payload, + region=region, + server_id=server_id, + resize_server_payload=resize_server_payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -25724,16 +33119,18 @@ def partial_update_network_without_preload_content( "401": "Error", "403": "Error", "404": "Error", + "409": "Error", "500": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _partial_update_network_serialize( + def _resize_server_serialize( self, project_id, - network_id, - partial_update_network_payload, + region, + server_id, + resize_server_payload, _request_auth, _content_type, _headers, @@ -25754,14 +33151,16 @@ def _partial_update_network_serialize( # process the path parameters if project_id is not None: _path_params["projectId"] = project_id - if network_id is not None: - _path_params["networkId"] = network_id + if region is not None: + _path_params["region"] = region + if server_id is not None: + _path_params["serverId"] = server_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - if partial_update_network_payload is not None: - _body_params = partial_update_network_payload + if resize_server_payload is not None: + _body_params = resize_server_payload # set the HTTP header `Accept` if "Accept" not in _header_params: @@ -25779,8 +33178,8 @@ def _partial_update_network_serialize( _auth_settings: List[str] = [] return self.api_client.param_serialize( - method="PATCH", - resource_path="/v1/projects/{projectId}/networks/{networkId}", + method="POST", + resource_path="/v2beta1/projects/{projectId}/regions/{region}/servers/{serverId}/resize", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -25794,23 +33193,20 @@ def _partial_update_network_serialize( ) @validate_call - def partial_update_network_area( + def resize_volume( self, - organization_id: Annotated[ + project_id: Annotated[ str, - Field( - min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Organization." - ), + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - area_id: Annotated[ + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + volume_id: Annotated[ str, - Field( - min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Network Area." - ), - ], - partial_update_network_area_payload: Annotated[ - PartialUpdateNetworkAreaPayload, Field(description="Request to update an area.") + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Volume."), ], + resize_volume_payload: Annotated[ + Optional[ResizeVolumePayload], Field(description="Request a volume resize.") + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -25820,17 +33216,19 @@ def partial_update_network_area( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> NetworkArea: - """Update network area settings. + ) -> None: + """Update the size of a volume. - Update the settings of a network area in an organization. + Update the size of a block device volume. The new volume size must be larger than the current size. - :param organization_id: The identifier (ID) of a STACKIT Organization. (required) - :type organization_id: str - :param area_id: The identifier (ID) of a STACKIT Network Area. (required) - :type area_id: str - :param partial_update_network_area_payload: Request to update an area. (required) - :type partial_update_network_area_payload: PartialUpdateNetworkAreaPayload + :param project_id: The identifier (ID) of a STACKIT Project. (required) + :type project_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param volume_id: The identifier (ID) of a STACKIT Volume. (required) + :type volume_id: str + :param resize_volume_payload: Request a volume resize. + :type resize_volume_payload: ResizeVolumePayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -25853,10 +33251,11 @@ def partial_update_network_area( :return: Returns the result object. """ # noqa: E501 - _param = self._partial_update_network_area_serialize( - organization_id=organization_id, - area_id=area_id, - partial_update_network_area_payload=partial_update_network_area_payload, + _param = self._resize_volume_serialize( + project_id=project_id, + region=region, + volume_id=volume_id, + resize_volume_payload=resize_volume_payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -25864,11 +33263,12 @@ def partial_update_network_area( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "NetworkArea", + "202": None, "400": "Error", "401": "Error", "403": "Error", "404": "Error", + "409": "Error", "500": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -25879,23 +33279,20 @@ def partial_update_network_area( ).data @validate_call - def partial_update_network_area_with_http_info( + def resize_volume_with_http_info( self, - organization_id: Annotated[ + project_id: Annotated[ str, - Field( - min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Organization." - ), + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - area_id: Annotated[ + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + volume_id: Annotated[ str, - Field( - min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Network Area." - ), - ], - partial_update_network_area_payload: Annotated[ - PartialUpdateNetworkAreaPayload, Field(description="Request to update an area.") + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Volume."), ], + resize_volume_payload: Annotated[ + Optional[ResizeVolumePayload], Field(description="Request a volume resize.") + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -25905,17 +33302,19 @@ def partial_update_network_area_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[NetworkArea]: - """Update network area settings. + ) -> ApiResponse[None]: + """Update the size of a volume. - Update the settings of a network area in an organization. + Update the size of a block device volume. The new volume size must be larger than the current size. - :param organization_id: The identifier (ID) of a STACKIT Organization. (required) - :type organization_id: str - :param area_id: The identifier (ID) of a STACKIT Network Area. (required) - :type area_id: str - :param partial_update_network_area_payload: Request to update an area. (required) - :type partial_update_network_area_payload: PartialUpdateNetworkAreaPayload + :param project_id: The identifier (ID) of a STACKIT Project. (required) + :type project_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param volume_id: The identifier (ID) of a STACKIT Volume. (required) + :type volume_id: str + :param resize_volume_payload: Request a volume resize. + :type resize_volume_payload: ResizeVolumePayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -25938,10 +33337,11 @@ def partial_update_network_area_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._partial_update_network_area_serialize( - organization_id=organization_id, - area_id=area_id, - partial_update_network_area_payload=partial_update_network_area_payload, + _param = self._resize_volume_serialize( + project_id=project_id, + region=region, + volume_id=volume_id, + resize_volume_payload=resize_volume_payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -25949,11 +33349,12 @@ def partial_update_network_area_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "NetworkArea", + "202": None, "400": "Error", "401": "Error", "403": "Error", "404": "Error", + "409": "Error", "500": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -25964,23 +33365,20 @@ def partial_update_network_area_with_http_info( ) @validate_call - def partial_update_network_area_without_preload_content( + def resize_volume_without_preload_content( self, - organization_id: Annotated[ + project_id: Annotated[ str, - Field( - min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Organization." - ), + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - area_id: Annotated[ + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + volume_id: Annotated[ str, - Field( - min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Network Area." - ), - ], - partial_update_network_area_payload: Annotated[ - PartialUpdateNetworkAreaPayload, Field(description="Request to update an area.") + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Volume."), ], + resize_volume_payload: Annotated[ + Optional[ResizeVolumePayload], Field(description="Request a volume resize.") + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -25991,16 +33389,18 @@ def partial_update_network_area_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Update network area settings. + """Update the size of a volume. - Update the settings of a network area in an organization. + Update the size of a block device volume. The new volume size must be larger than the current size. - :param organization_id: The identifier (ID) of a STACKIT Organization. (required) - :type organization_id: str - :param area_id: The identifier (ID) of a STACKIT Network Area. (required) - :type area_id: str - :param partial_update_network_area_payload: Request to update an area. (required) - :type partial_update_network_area_payload: PartialUpdateNetworkAreaPayload + :param project_id: The identifier (ID) of a STACKIT Project. (required) + :type project_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param volume_id: The identifier (ID) of a STACKIT Volume. (required) + :type volume_id: str + :param resize_volume_payload: Request a volume resize. + :type resize_volume_payload: ResizeVolumePayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -26023,10 +33423,11 @@ def partial_update_network_area_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._partial_update_network_area_serialize( - organization_id=organization_id, - area_id=area_id, - partial_update_network_area_payload=partial_update_network_area_payload, + _param = self._resize_volume_serialize( + project_id=project_id, + region=region, + volume_id=volume_id, + resize_volume_payload=resize_volume_payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -26034,21 +33435,23 @@ def partial_update_network_area_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "NetworkArea", + "202": None, "400": "Error", "401": "Error", "403": "Error", "404": "Error", + "409": "Error", "500": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _partial_update_network_area_serialize( + def _resize_volume_serialize( self, - organization_id, - area_id, - partial_update_network_area_payload, + project_id, + region, + volume_id, + resize_volume_payload, _request_auth, _content_type, _headers, @@ -26067,16 +33470,18 @@ def _partial_update_network_area_serialize( _body_params: Optional[bytes] = None # process the path parameters - if organization_id is not None: - _path_params["organizationId"] = organization_id - if area_id is not None: - _path_params["areaId"] = area_id + if project_id is not None: + _path_params["projectId"] = project_id + if region is not None: + _path_params["region"] = region + if volume_id is not None: + _path_params["volumeId"] = volume_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - if partial_update_network_area_payload is not None: - _body_params = partial_update_network_area_payload + if resize_volume_payload is not None: + _body_params = resize_volume_payload # set the HTTP header `Accept` if "Accept" not in _header_params: @@ -26094,8 +33499,8 @@ def _partial_update_network_area_serialize( _auth_settings: List[str] = [] return self.api_client.param_serialize( - method="PATCH", - resource_path="/v1/organizations/{organizationId}/network-areas/{areaId}", + method="POST", + resource_path="/v2beta1/projects/{projectId}/regions/{region}/volumes/{volumeId}/resize", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -26109,17 +33514,17 @@ def _partial_update_network_area_serialize( ) @validate_call - def reboot_server( + def restore_backup( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - server_id: Annotated[ + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + backup_id: Annotated[ str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Server."), + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Backup."), ], - action: Annotated[Optional[StrictStr], Field(description="Defines if it is a soft or a hard reboot.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -26130,16 +33535,16 @@ def reboot_server( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> None: - """Reboot the server. + """Restore Backup to the referenced source Volume. - Reboot the server. A soft reboot will attempt to gracefully shut down the server by passing the command to the operating system. A hard reboot will power cycle the server without waiting for the operating system to shutdown properly. + Restores a Backup to the existing Volume it references to. The use of this endpoint is disruptive as the volume needs to be detached. If a new volume is to be created use the volumes endpoint with the option to create from backup. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str - :param server_id: The identifier (ID) of a STACKIT Server. (required) - :type server_id: str - :param action: Defines if it is a soft or a hard reboot. - :type action: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param backup_id: The identifier (ID) of a STACKIT Backup. (required) + :type backup_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -26162,10 +33567,10 @@ def reboot_server( :return: Returns the result object. """ # noqa: E501 - _param = self._reboot_server_serialize( + _param = self._restore_backup_serialize( project_id=project_id, - server_id=server_id, - action=action, + region=region, + backup_id=backup_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -26178,7 +33583,6 @@ def reboot_server( "401": "Error", "403": "Error", "404": "Error", - "409": "Error", "500": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -26189,17 +33593,17 @@ def reboot_server( ).data @validate_call - def reboot_server_with_http_info( + def restore_backup_with_http_info( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - server_id: Annotated[ + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + backup_id: Annotated[ str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Server."), + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Backup."), ], - action: Annotated[Optional[StrictStr], Field(description="Defines if it is a soft or a hard reboot.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -26210,16 +33614,16 @@ def reboot_server_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[None]: - """Reboot the server. + """Restore Backup to the referenced source Volume. - Reboot the server. A soft reboot will attempt to gracefully shut down the server by passing the command to the operating system. A hard reboot will power cycle the server without waiting for the operating system to shutdown properly. + Restores a Backup to the existing Volume it references to. The use of this endpoint is disruptive as the volume needs to be detached. If a new volume is to be created use the volumes endpoint with the option to create from backup. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str - :param server_id: The identifier (ID) of a STACKIT Server. (required) - :type server_id: str - :param action: Defines if it is a soft or a hard reboot. - :type action: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param backup_id: The identifier (ID) of a STACKIT Backup. (required) + :type backup_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -26242,10 +33646,10 @@ def reboot_server_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._reboot_server_serialize( + _param = self._restore_backup_serialize( project_id=project_id, - server_id=server_id, - action=action, + region=region, + backup_id=backup_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -26258,7 +33662,6 @@ def reboot_server_with_http_info( "401": "Error", "403": "Error", "404": "Error", - "409": "Error", "500": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -26269,17 +33672,17 @@ def reboot_server_with_http_info( ) @validate_call - def reboot_server_without_preload_content( + def restore_backup_without_preload_content( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - server_id: Annotated[ + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + backup_id: Annotated[ str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Server."), + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Backup."), ], - action: Annotated[Optional[StrictStr], Field(description="Defines if it is a soft or a hard reboot.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -26290,16 +33693,16 @@ def reboot_server_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Reboot the server. + """Restore Backup to the referenced source Volume. - Reboot the server. A soft reboot will attempt to gracefully shut down the server by passing the command to the operating system. A hard reboot will power cycle the server without waiting for the operating system to shutdown properly. + Restores a Backup to the existing Volume it references to. The use of this endpoint is disruptive as the volume needs to be detached. If a new volume is to be created use the volumes endpoint with the option to create from backup. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str - :param server_id: The identifier (ID) of a STACKIT Server. (required) - :type server_id: str - :param action: Defines if it is a soft or a hard reboot. - :type action: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param backup_id: The identifier (ID) of a STACKIT Backup. (required) + :type backup_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -26322,10 +33725,10 @@ def reboot_server_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._reboot_server_serialize( + _param = self._restore_backup_serialize( project_id=project_id, - server_id=server_id, - action=action, + region=region, + backup_id=backup_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -26338,17 +33741,16 @@ def reboot_server_without_preload_content( "401": "Error", "403": "Error", "404": "Error", - "409": "Error", "500": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _reboot_server_serialize( + def _restore_backup_serialize( self, project_id, - server_id, - action, + region, + backup_id, _request_auth, _content_type, _headers, @@ -26369,13 +33771,11 @@ def _reboot_server_serialize( # process the path parameters if project_id is not None: _path_params["projectId"] = project_id - if server_id is not None: - _path_params["serverId"] = server_id + if region is not None: + _path_params["region"] = region + if backup_id is not None: + _path_params["backupId"] = backup_id # process the query parameters - if action is not None: - - _query_params.append(("action", action)) - # process the header parameters # process the form parameters # process the body parameter @@ -26389,7 +33789,7 @@ def _reboot_server_serialize( return self.api_client.param_serialize( method="POST", - resource_path="/v1/projects/{projectId}/servers/{serverId}/reboot", + resource_path="/v2beta1/projects/{projectId}/regions/{region}/backups/{backupId}/restore", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -26403,20 +33803,17 @@ def _reboot_server_serialize( ) @validate_call - def remove_network_from_server( + def set_image_share( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - server_id: Annotated[ - str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Server."), - ], - network_id: Annotated[ - str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Network."), + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + image_id: Annotated[ + str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Image.") ], + set_image_share_payload: Annotated[SetImageSharePayload, Field(description="Settings for an Image Share.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -26426,17 +33823,19 @@ def remove_network_from_server( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> None: - """Detach and delete all network interfaces associated with the specified network. + ) -> ImageShare: + """Set image share. - Detach and delete all network interfaces associated with the specified network from the server. + Set share of an Image. New Options will replace existing settings. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str - :param server_id: The identifier (ID) of a STACKIT Server. (required) - :type server_id: str - :param network_id: The identifier (ID) of a STACKIT Network. (required) - :type network_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param image_id: The identifier (ID) of a STACKIT Image. (required) + :type image_id: str + :param set_image_share_payload: Settings for an Image Share. (required) + :type set_image_share_payload: SetImageSharePayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -26459,10 +33858,11 @@ def remove_network_from_server( :return: Returns the result object. """ # noqa: E501 - _param = self._remove_network_from_server_serialize( + _param = self._set_image_share_serialize( project_id=project_id, - server_id=server_id, - network_id=network_id, + region=region, + image_id=image_id, + set_image_share_payload=set_image_share_payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -26470,7 +33870,7 @@ def remove_network_from_server( ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, + "200": "ImageShare", "400": "Error", "401": "Error", "403": "Error", @@ -26485,20 +33885,17 @@ def remove_network_from_server( ).data @validate_call - def remove_network_from_server_with_http_info( + def set_image_share_with_http_info( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - server_id: Annotated[ - str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Server."), - ], - network_id: Annotated[ - str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Network."), + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + image_id: Annotated[ + str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Image.") ], + set_image_share_payload: Annotated[SetImageSharePayload, Field(description="Settings for an Image Share.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -26508,17 +33905,19 @@ def remove_network_from_server_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[None]: - """Detach and delete all network interfaces associated with the specified network. + ) -> ApiResponse[ImageShare]: + """Set image share. - Detach and delete all network interfaces associated with the specified network from the server. + Set share of an Image. New Options will replace existing settings. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str - :param server_id: The identifier (ID) of a STACKIT Server. (required) - :type server_id: str - :param network_id: The identifier (ID) of a STACKIT Network. (required) - :type network_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param image_id: The identifier (ID) of a STACKIT Image. (required) + :type image_id: str + :param set_image_share_payload: Settings for an Image Share. (required) + :type set_image_share_payload: SetImageSharePayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -26541,10 +33940,11 @@ def remove_network_from_server_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._remove_network_from_server_serialize( + _param = self._set_image_share_serialize( project_id=project_id, - server_id=server_id, - network_id=network_id, + region=region, + image_id=image_id, + set_image_share_payload=set_image_share_payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -26552,7 +33952,7 @@ def remove_network_from_server_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, + "200": "ImageShare", "400": "Error", "401": "Error", "403": "Error", @@ -26567,20 +33967,17 @@ def remove_network_from_server_with_http_info( ) @validate_call - def remove_network_from_server_without_preload_content( + def set_image_share_without_preload_content( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - server_id: Annotated[ - str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Server."), - ], - network_id: Annotated[ - str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Network."), + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + image_id: Annotated[ + str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Image.") ], + set_image_share_payload: Annotated[SetImageSharePayload, Field(description="Settings for an Image Share.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -26591,16 +33988,18 @@ def remove_network_from_server_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Detach and delete all network interfaces associated with the specified network. + """Set image share. - Detach and delete all network interfaces associated with the specified network from the server. + Set share of an Image. New Options will replace existing settings. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str - :param server_id: The identifier (ID) of a STACKIT Server. (required) - :type server_id: str - :param network_id: The identifier (ID) of a STACKIT Network. (required) - :type network_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param image_id: The identifier (ID) of a STACKIT Image. (required) + :type image_id: str + :param set_image_share_payload: Settings for an Image Share. (required) + :type set_image_share_payload: SetImageSharePayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -26623,10 +34022,11 @@ def remove_network_from_server_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._remove_network_from_server_serialize( + _param = self._set_image_share_serialize( project_id=project_id, - server_id=server_id, - network_id=network_id, + region=region, + image_id=image_id, + set_image_share_payload=set_image_share_payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -26634,7 +34034,7 @@ def remove_network_from_server_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, + "200": "ImageShare", "400": "Error", "401": "Error", "403": "Error", @@ -26644,11 +34044,12 @@ def remove_network_from_server_without_preload_content( response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _remove_network_from_server_serialize( + def _set_image_share_serialize( self, project_id, - server_id, - network_id, + region, + image_id, + set_image_share_payload, _request_auth, _content_type, _headers, @@ -26669,25 +34070,35 @@ def _remove_network_from_server_serialize( # process the path parameters if project_id is not None: _path_params["projectId"] = project_id - if server_id is not None: - _path_params["serverId"] = server_id - if network_id is not None: - _path_params["networkId"] = network_id + if region is not None: + _path_params["region"] = region + if image_id is not None: + _path_params["imageId"] = image_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + if set_image_share_payload is not None: + _body_params = set_image_share_payload # set the HTTP header `Accept` if "Accept" not in _header_params: _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + # set the HTTP header `Content-Type` + if _content_type: + _header_params["Content-Type"] = _content_type + else: + _default_content_type = self.api_client.select_header_content_type(["application/json"]) + if _default_content_type is not None: + _header_params["Content-Type"] = _default_content_type + # authentication setting _auth_settings: List[str] = [] return self.api_client.param_serialize( - method="DELETE", - resource_path="/v1/projects/{projectId}/servers/{serverId}/networks/{networkId}", + method="PUT", + resource_path="/v2beta1/projects/{projectId}/regions/{region}/images/{imageId}/share", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -26701,20 +34112,17 @@ def _remove_network_from_server_serialize( ) @validate_call - def remove_nic_from_server( + def start_server( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], server_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Server."), ], - nic_id: Annotated[ - str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a network interface."), - ], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -26725,16 +34133,16 @@ def remove_nic_from_server( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> None: - """Detach a network interface. + """Boot up a server. - Detach a network interface from a server. + Start an existing server or allocates the server if deallocated. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str :param server_id: The identifier (ID) of a STACKIT Server. (required) :type server_id: str - :param nic_id: The identifier (ID) of a network interface. (required) - :type nic_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -26757,10 +34165,10 @@ def remove_nic_from_server( :return: Returns the result object. """ # noqa: E501 - _param = self._remove_nic_from_server_serialize( + _param = self._start_server_serialize( project_id=project_id, + region=region, server_id=server_id, - nic_id=nic_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -26768,11 +34176,12 @@ def remove_nic_from_server( ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, + "202": None, "400": "Error", "401": "Error", "403": "Error", "404": "Error", + "409": "Error", "500": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -26783,20 +34192,17 @@ def remove_nic_from_server( ).data @validate_call - def remove_nic_from_server_with_http_info( + def start_server_with_http_info( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], server_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Server."), ], - nic_id: Annotated[ - str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a network interface."), - ], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -26807,16 +34213,16 @@ def remove_nic_from_server_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[None]: - """Detach a network interface. + """Boot up a server. - Detach a network interface from a server. + Start an existing server or allocates the server if deallocated. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str :param server_id: The identifier (ID) of a STACKIT Server. (required) :type server_id: str - :param nic_id: The identifier (ID) of a network interface. (required) - :type nic_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -26839,10 +34245,10 @@ def remove_nic_from_server_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._remove_nic_from_server_serialize( + _param = self._start_server_serialize( project_id=project_id, + region=region, server_id=server_id, - nic_id=nic_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -26850,11 +34256,12 @@ def remove_nic_from_server_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, + "202": None, "400": "Error", "401": "Error", "403": "Error", "404": "Error", + "409": "Error", "500": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -26865,20 +34272,17 @@ def remove_nic_from_server_with_http_info( ) @validate_call - def remove_nic_from_server_without_preload_content( + def start_server_without_preload_content( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], server_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Server."), ], - nic_id: Annotated[ - str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a network interface."), - ], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -26889,16 +34293,16 @@ def remove_nic_from_server_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Detach a network interface. + """Boot up a server. - Detach a network interface from a server. + Start an existing server or allocates the server if deallocated. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str :param server_id: The identifier (ID) of a STACKIT Server. (required) :type server_id: str - :param nic_id: The identifier (ID) of a network interface. (required) - :type nic_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -26921,10 +34325,10 @@ def remove_nic_from_server_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._remove_nic_from_server_serialize( + _param = self._start_server_serialize( project_id=project_id, + region=region, server_id=server_id, - nic_id=nic_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -26932,21 +34336,22 @@ def remove_nic_from_server_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, + "202": None, "400": "Error", "401": "Error", "403": "Error", "404": "Error", + "409": "Error", "500": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _remove_nic_from_server_serialize( + def _start_server_serialize( self, project_id, + region, server_id, - nic_id, _request_auth, _content_type, _headers, @@ -26967,10 +34372,10 @@ def _remove_nic_from_server_serialize( # process the path parameters if project_id is not None: _path_params["projectId"] = project_id + if region is not None: + _path_params["region"] = region if server_id is not None: _path_params["serverId"] = server_id - if nic_id is not None: - _path_params["nicId"] = nic_id # process the query parameters # process the header parameters # process the form parameters @@ -26984,8 +34389,8 @@ def _remove_nic_from_server_serialize( _auth_settings: List[str] = [] return self.api_client.param_serialize( - method="DELETE", - resource_path="/v1/projects/{projectId}/servers/{serverId}/nics/{nicId}", + method="POST", + resource_path="/v2beta1/projects/{projectId}/regions/{region}/servers/{serverId}/start", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -26999,19 +34404,17 @@ def _remove_nic_from_server_serialize( ) @validate_call - def remove_public_ip_from_server( + def stop_server( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], server_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Server."), ], - public_ip_id: Annotated[ - str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a Public IP.") - ], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -27022,16 +34425,16 @@ def remove_public_ip_from_server( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> None: - """Dissociate a public IP from a server. + """Stop an existing server. - Dissociate a public IP on an existing server. + Stops an existing server. The server will remain on the Hypervisor and will be charged full price for all resources attached to it. The attached resources will remain reserved. Useful particularly for vGPU servers. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str :param server_id: The identifier (ID) of a STACKIT Server. (required) :type server_id: str - :param public_ip_id: The identifier (ID) of a Public IP. (required) - :type public_ip_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -27054,10 +34457,10 @@ def remove_public_ip_from_server( :return: Returns the result object. """ # noqa: E501 - _param = self._remove_public_ip_from_server_serialize( + _param = self._stop_server_serialize( project_id=project_id, + region=region, server_id=server_id, - public_ip_id=public_ip_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -27065,7 +34468,7 @@ def remove_public_ip_from_server( ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, + "202": None, "400": "Error", "401": "Error", "403": "Error", @@ -27081,19 +34484,17 @@ def remove_public_ip_from_server( ).data @validate_call - def remove_public_ip_from_server_with_http_info( + def stop_server_with_http_info( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], server_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Server."), ], - public_ip_id: Annotated[ - str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a Public IP.") - ], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -27104,16 +34505,16 @@ def remove_public_ip_from_server_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[None]: - """Dissociate a public IP from a server. + """Stop an existing server. - Dissociate a public IP on an existing server. + Stops an existing server. The server will remain on the Hypervisor and will be charged full price for all resources attached to it. The attached resources will remain reserved. Useful particularly for vGPU servers. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str :param server_id: The identifier (ID) of a STACKIT Server. (required) :type server_id: str - :param public_ip_id: The identifier (ID) of a Public IP. (required) - :type public_ip_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -27136,10 +34537,10 @@ def remove_public_ip_from_server_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._remove_public_ip_from_server_serialize( + _param = self._stop_server_serialize( project_id=project_id, + region=region, server_id=server_id, - public_ip_id=public_ip_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -27147,7 +34548,7 @@ def remove_public_ip_from_server_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, + "202": None, "400": "Error", "401": "Error", "403": "Error", @@ -27163,19 +34564,17 @@ def remove_public_ip_from_server_with_http_info( ) @validate_call - def remove_public_ip_from_server_without_preload_content( + def stop_server_without_preload_content( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], server_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Server."), ], - public_ip_id: Annotated[ - str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a Public IP.") - ], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -27186,16 +34585,16 @@ def remove_public_ip_from_server_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Dissociate a public IP from a server. + """Stop an existing server. - Dissociate a public IP on an existing server. + Stops an existing server. The server will remain on the Hypervisor and will be charged full price for all resources attached to it. The attached resources will remain reserved. Useful particularly for vGPU servers. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str :param server_id: The identifier (ID) of a STACKIT Server. (required) :type server_id: str - :param public_ip_id: The identifier (ID) of a Public IP. (required) - :type public_ip_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -27218,10 +34617,10 @@ def remove_public_ip_from_server_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._remove_public_ip_from_server_serialize( + _param = self._stop_server_serialize( project_id=project_id, + region=region, server_id=server_id, - public_ip_id=public_ip_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -27229,7 +34628,7 @@ def remove_public_ip_from_server_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, + "202": None, "400": "Error", "401": "Error", "403": "Error", @@ -27240,11 +34639,11 @@ def remove_public_ip_from_server_without_preload_content( response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _remove_public_ip_from_server_serialize( + def _stop_server_serialize( self, project_id, + region, server_id, - public_ip_id, _request_auth, _content_type, _headers, @@ -27265,10 +34664,10 @@ def _remove_public_ip_from_server_serialize( # process the path parameters if project_id is not None: _path_params["projectId"] = project_id + if region is not None: + _path_params["region"] = region if server_id is not None: _path_params["serverId"] = server_id - if public_ip_id is not None: - _path_params["publicIpId"] = public_ip_id # process the query parameters # process the header parameters # process the form parameters @@ -27282,8 +34681,8 @@ def _remove_public_ip_from_server_serialize( _auth_settings: List[str] = [] return self.api_client.param_serialize( - method="DELETE", - resource_path="/v1/projects/{projectId}/servers/{serverId}/public-ips/{publicIpId}", + method="POST", + resource_path="/v2beta1/projects/{projectId}/regions/{region}/servers/{serverId}/stop", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -27297,25 +34696,17 @@ def _remove_public_ip_from_server_serialize( ) @validate_call - def remove_security_group_from_server( + def unrescue_server( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], server_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Server."), ], - security_group_id: Annotated[ - str, - Field( - min_length=36, - strict=True, - max_length=36, - description="The identifier (ID) of a STACKIT Security Group.", - ), - ], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -27326,16 +34717,16 @@ def remove_security_group_from_server( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> None: - """Remove a server from a security group. + """Unrescue an existing server. - Remove a server from a attached security group. + Unrescue an existing server. The original boot volume is attached as boot volume of the server and the server is booted up. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str :param server_id: The identifier (ID) of a STACKIT Server. (required) :type server_id: str - :param security_group_id: The identifier (ID) of a STACKIT Security Group. (required) - :type security_group_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -27358,10 +34749,10 @@ def remove_security_group_from_server( :return: Returns the result object. """ # noqa: E501 - _param = self._remove_security_group_from_server_serialize( + _param = self._unrescue_server_serialize( project_id=project_id, + region=region, server_id=server_id, - security_group_id=security_group_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -27369,7 +34760,7 @@ def remove_security_group_from_server( ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, + "202": None, "400": "Error", "401": "Error", "403": "Error", @@ -27385,25 +34776,17 @@ def remove_security_group_from_server( ).data @validate_call - def remove_security_group_from_server_with_http_info( + def unrescue_server_with_http_info( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], server_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Server."), ], - security_group_id: Annotated[ - str, - Field( - min_length=36, - strict=True, - max_length=36, - description="The identifier (ID) of a STACKIT Security Group.", - ), - ], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -27414,16 +34797,16 @@ def remove_security_group_from_server_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[None]: - """Remove a server from a security group. + """Unrescue an existing server. - Remove a server from a attached security group. + Unrescue an existing server. The original boot volume is attached as boot volume of the server and the server is booted up. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str :param server_id: The identifier (ID) of a STACKIT Server. (required) :type server_id: str - :param security_group_id: The identifier (ID) of a STACKIT Security Group. (required) - :type security_group_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -27446,10 +34829,10 @@ def remove_security_group_from_server_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._remove_security_group_from_server_serialize( + _param = self._unrescue_server_serialize( project_id=project_id, + region=region, server_id=server_id, - security_group_id=security_group_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -27457,7 +34840,7 @@ def remove_security_group_from_server_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, + "202": None, "400": "Error", "401": "Error", "403": "Error", @@ -27473,25 +34856,17 @@ def remove_security_group_from_server_with_http_info( ) @validate_call - def remove_security_group_from_server_without_preload_content( + def unrescue_server_without_preload_content( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], server_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Server."), ], - security_group_id: Annotated[ - str, - Field( - min_length=36, - strict=True, - max_length=36, - description="The identifier (ID) of a STACKIT Security Group.", - ), - ], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -27502,16 +34877,16 @@ def remove_security_group_from_server_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Remove a server from a security group. + """Unrescue an existing server. - Remove a server from a attached security group. + Unrescue an existing server. The original boot volume is attached as boot volume of the server and the server is booted up. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str :param server_id: The identifier (ID) of a STACKIT Server. (required) :type server_id: str - :param security_group_id: The identifier (ID) of a STACKIT Security Group. (required) - :type security_group_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -27534,10 +34909,10 @@ def remove_security_group_from_server_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._remove_security_group_from_server_serialize( + _param = self._unrescue_server_serialize( project_id=project_id, + region=region, server_id=server_id, - security_group_id=security_group_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -27545,7 +34920,7 @@ def remove_security_group_from_server_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, + "202": None, "400": "Error", "401": "Error", "403": "Error", @@ -27556,11 +34931,11 @@ def remove_security_group_from_server_without_preload_content( response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _remove_security_group_from_server_serialize( + def _unrescue_server_serialize( self, project_id, + region, server_id, - security_group_id, _request_auth, _content_type, _headers, @@ -27581,10 +34956,10 @@ def _remove_security_group_from_server_serialize( # process the path parameters if project_id is not None: _path_params["projectId"] = project_id + if region is not None: + _path_params["region"] = region if server_id is not None: _path_params["serverId"] = server_id - if security_group_id is not None: - _path_params["securityGroupId"] = security_group_id # process the query parameters # process the header parameters # process the form parameters @@ -27598,8 +34973,8 @@ def _remove_security_group_from_server_serialize( _auth_settings: List[str] = [] return self.api_client.param_serialize( - method="DELETE", - resource_path="/v1/projects/{projectId}/servers/{serverId}/security-groups/{securityGroupId}", + method="POST", + resource_path="/v2beta1/projects/{projectId}/regions/{region}/servers/{serverId}/unrescue", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -27613,18 +34988,23 @@ def _remove_security_group_from_server_serialize( ) @validate_call - def remove_service_account_from_server( + def update_attached_volume( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], server_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Server."), ], - service_account_mail: Annotated[ - str, Field(strict=True, max_length=255, description="The e-mail address of a service account.") + volume_id: Annotated[ + str, + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Volume."), + ], + update_attached_volume_payload: Annotated[ + UpdateAttachedVolumePayload, Field(description="Request a volume attachment update.") ], _request_timeout: Union[ None, @@ -27635,17 +35015,21 @@ def remove_service_account_from_server( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ServiceAccountMailListResponse: - """Detach a service account from a server. + ) -> VolumeAttachment: + """Update Volume Attachment Parameters. - Detach an additional service account from the server. + Update the properties of an existing Volume Attachment. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str :param server_id: The identifier (ID) of a STACKIT Server. (required) :type server_id: str - :param service_account_mail: The e-mail address of a service account. (required) - :type service_account_mail: str + :param volume_id: The identifier (ID) of a STACKIT Volume. (required) + :type volume_id: str + :param update_attached_volume_payload: Request a volume attachment update. (required) + :type update_attached_volume_payload: UpdateAttachedVolumePayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -27668,10 +35052,12 @@ def remove_service_account_from_server( :return: Returns the result object. """ # noqa: E501 - _param = self._remove_service_account_from_server_serialize( + _param = self._update_attached_volume_serialize( project_id=project_id, + region=region, server_id=server_id, - service_account_mail=service_account_mail, + volume_id=volume_id, + update_attached_volume_payload=update_attached_volume_payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -27679,12 +35065,11 @@ def remove_service_account_from_server( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ServiceAccountMailListResponse", + "200": "VolumeAttachment", "400": "Error", "401": "Error", "403": "Error", "404": "Error", - "409": "Error", "500": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -27695,18 +35080,23 @@ def remove_service_account_from_server( ).data @validate_call - def remove_service_account_from_server_with_http_info( + def update_attached_volume_with_http_info( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], server_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Server."), ], - service_account_mail: Annotated[ - str, Field(strict=True, max_length=255, description="The e-mail address of a service account.") + volume_id: Annotated[ + str, + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Volume."), + ], + update_attached_volume_payload: Annotated[ + UpdateAttachedVolumePayload, Field(description="Request a volume attachment update.") ], _request_timeout: Union[ None, @@ -27717,17 +35107,21 @@ def remove_service_account_from_server_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[ServiceAccountMailListResponse]: - """Detach a service account from a server. + ) -> ApiResponse[VolumeAttachment]: + """Update Volume Attachment Parameters. - Detach an additional service account from the server. + Update the properties of an existing Volume Attachment. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str :param server_id: The identifier (ID) of a STACKIT Server. (required) :type server_id: str - :param service_account_mail: The e-mail address of a service account. (required) - :type service_account_mail: str + :param volume_id: The identifier (ID) of a STACKIT Volume. (required) + :type volume_id: str + :param update_attached_volume_payload: Request a volume attachment update. (required) + :type update_attached_volume_payload: UpdateAttachedVolumePayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -27750,10 +35144,12 @@ def remove_service_account_from_server_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._remove_service_account_from_server_serialize( + _param = self._update_attached_volume_serialize( project_id=project_id, + region=region, server_id=server_id, - service_account_mail=service_account_mail, + volume_id=volume_id, + update_attached_volume_payload=update_attached_volume_payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -27761,12 +35157,11 @@ def remove_service_account_from_server_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ServiceAccountMailListResponse", + "200": "VolumeAttachment", "400": "Error", "401": "Error", "403": "Error", "404": "Error", - "409": "Error", "500": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -27777,18 +35172,23 @@ def remove_service_account_from_server_with_http_info( ) @validate_call - def remove_service_account_from_server_without_preload_content( + def update_attached_volume_without_preload_content( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], server_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Server."), ], - service_account_mail: Annotated[ - str, Field(strict=True, max_length=255, description="The e-mail address of a service account.") + volume_id: Annotated[ + str, + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Volume."), + ], + update_attached_volume_payload: Annotated[ + UpdateAttachedVolumePayload, Field(description="Request a volume attachment update.") ], _request_timeout: Union[ None, @@ -27800,16 +35200,20 @@ def remove_service_account_from_server_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Detach a service account from a server. + """Update Volume Attachment Parameters. - Detach an additional service account from the server. + Update the properties of an existing Volume Attachment. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str :param server_id: The identifier (ID) of a STACKIT Server. (required) :type server_id: str - :param service_account_mail: The e-mail address of a service account. (required) - :type service_account_mail: str + :param volume_id: The identifier (ID) of a STACKIT Volume. (required) + :type volume_id: str + :param update_attached_volume_payload: Request a volume attachment update. (required) + :type update_attached_volume_payload: UpdateAttachedVolumePayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -27832,10 +35236,12 @@ def remove_service_account_from_server_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._remove_service_account_from_server_serialize( + _param = self._update_attached_volume_serialize( project_id=project_id, + region=region, server_id=server_id, - service_account_mail=service_account_mail, + volume_id=volume_id, + update_attached_volume_payload=update_attached_volume_payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -27843,22 +35249,23 @@ def remove_service_account_from_server_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ServiceAccountMailListResponse", + "200": "VolumeAttachment", "400": "Error", "401": "Error", "403": "Error", "404": "Error", - "409": "Error", "500": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _remove_service_account_from_server_serialize( + def _update_attached_volume_serialize( self, project_id, + region, server_id, - service_account_mail, + volume_id, + update_attached_volume_payload, _request_auth, _content_type, _headers, @@ -27879,25 +35286,37 @@ def _remove_service_account_from_server_serialize( # process the path parameters if project_id is not None: _path_params["projectId"] = project_id + if region is not None: + _path_params["region"] = region if server_id is not None: _path_params["serverId"] = server_id - if service_account_mail is not None: - _path_params["serviceAccountMail"] = service_account_mail + if volume_id is not None: + _path_params["volumeId"] = volume_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + if update_attached_volume_payload is not None: + _body_params = update_attached_volume_payload # set the HTTP header `Accept` if "Accept" not in _header_params: _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + # set the HTTP header `Content-Type` + if _content_type: + _header_params["Content-Type"] = _content_type + else: + _default_content_type = self.api_client.select_header_content_type(["application/json"]) + if _default_content_type is not None: + _header_params["Content-Type"] = _default_content_type + # authentication setting _auth_settings: List[str] = [] return self.api_client.param_serialize( - method="DELETE", - resource_path="/v1/projects/{projectId}/servers/{serverId}/service-accounts/{serviceAccountMail}", + method="PATCH", + resource_path="/v2beta1/projects/{projectId}/regions/{region}/servers/{serverId}/volume-attachments/{volumeId}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -27911,20 +35330,17 @@ def _remove_service_account_from_server_serialize( ) @validate_call - def remove_volume_from_server( + def update_image( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - server_id: Annotated[ - str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Server."), - ], - volume_id: Annotated[ - str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Volume."), + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + image_id: Annotated[ + str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Image.") ], + update_image_payload: Annotated[UpdateImagePayload, Field(description="Request an update of an Image.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -27934,17 +35350,19 @@ def remove_volume_from_server( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> None: - """Detach a volume from a server. + ) -> Image: + """Update Image Parameters. - Detach an existing volume from an existing server. + Update the properties of an existing Image inside a project. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str - :param server_id: The identifier (ID) of a STACKIT Server. (required) - :type server_id: str - :param volume_id: The identifier (ID) of a STACKIT Volume. (required) - :type volume_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param image_id: The identifier (ID) of a STACKIT Image. (required) + :type image_id: str + :param update_image_payload: Request an update of an Image. (required) + :type update_image_payload: UpdateImagePayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -27967,10 +35385,11 @@ def remove_volume_from_server( :return: Returns the result object. """ # noqa: E501 - _param = self._remove_volume_from_server_serialize( + _param = self._update_image_serialize( project_id=project_id, - server_id=server_id, - volume_id=volume_id, + region=region, + image_id=image_id, + update_image_payload=update_image_payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -27978,12 +35397,11 @@ def remove_volume_from_server( ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, + "200": "Image", "400": "Error", "401": "Error", "403": "Error", "404": "Error", - "409": "Error", "500": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -27994,20 +35412,17 @@ def remove_volume_from_server( ).data @validate_call - def remove_volume_from_server_with_http_info( + def update_image_with_http_info( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - server_id: Annotated[ - str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Server."), - ], - volume_id: Annotated[ - str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Volume."), + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + image_id: Annotated[ + str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Image.") ], + update_image_payload: Annotated[UpdateImagePayload, Field(description="Request an update of an Image.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -28017,17 +35432,19 @@ def remove_volume_from_server_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[None]: - """Detach a volume from a server. + ) -> ApiResponse[Image]: + """Update Image Parameters. - Detach an existing volume from an existing server. + Update the properties of an existing Image inside a project. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str - :param server_id: The identifier (ID) of a STACKIT Server. (required) - :type server_id: str - :param volume_id: The identifier (ID) of a STACKIT Volume. (required) - :type volume_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param image_id: The identifier (ID) of a STACKIT Image. (required) + :type image_id: str + :param update_image_payload: Request an update of an Image. (required) + :type update_image_payload: UpdateImagePayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -28050,10 +35467,11 @@ def remove_volume_from_server_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._remove_volume_from_server_serialize( + _param = self._update_image_serialize( project_id=project_id, - server_id=server_id, - volume_id=volume_id, + region=region, + image_id=image_id, + update_image_payload=update_image_payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -28061,12 +35479,11 @@ def remove_volume_from_server_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, + "200": "Image", "400": "Error", "401": "Error", "403": "Error", "404": "Error", - "409": "Error", "500": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -28077,20 +35494,17 @@ def remove_volume_from_server_with_http_info( ) @validate_call - def remove_volume_from_server_without_preload_content( + def update_image_without_preload_content( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - server_id: Annotated[ - str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Server."), - ], - volume_id: Annotated[ - str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Volume."), + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + image_id: Annotated[ + str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Image.") ], + update_image_payload: Annotated[UpdateImagePayload, Field(description="Request an update of an Image.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -28101,16 +35515,18 @@ def remove_volume_from_server_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Detach a volume from a server. + """Update Image Parameters. - Detach an existing volume from an existing server. + Update the properties of an existing Image inside a project. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str - :param server_id: The identifier (ID) of a STACKIT Server. (required) - :type server_id: str - :param volume_id: The identifier (ID) of a STACKIT Volume. (required) - :type volume_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param image_id: The identifier (ID) of a STACKIT Image. (required) + :type image_id: str + :param update_image_payload: Request an update of an Image. (required) + :type update_image_payload: UpdateImagePayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -28133,10 +35549,11 @@ def remove_volume_from_server_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._remove_volume_from_server_serialize( + _param = self._update_image_serialize( project_id=project_id, - server_id=server_id, - volume_id=volume_id, + region=region, + image_id=image_id, + update_image_payload=update_image_payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -28144,22 +35561,22 @@ def remove_volume_from_server_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "204": None, + "200": "Image", "400": "Error", "401": "Error", "403": "Error", "404": "Error", - "409": "Error", "500": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _remove_volume_from_server_serialize( + def _update_image_serialize( self, project_id, - server_id, - volume_id, + region, + image_id, + update_image_payload, _request_auth, _content_type, _headers, @@ -28180,25 +35597,35 @@ def _remove_volume_from_server_serialize( # process the path parameters if project_id is not None: _path_params["projectId"] = project_id - if server_id is not None: - _path_params["serverId"] = server_id - if volume_id is not None: - _path_params["volumeId"] = volume_id + if region is not None: + _path_params["region"] = region + if image_id is not None: + _path_params["imageId"] = image_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + if update_image_payload is not None: + _body_params = update_image_payload # set the HTTP header `Accept` if "Accept" not in _header_params: _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + # set the HTTP header `Content-Type` + if _content_type: + _header_params["Content-Type"] = _content_type + else: + _default_content_type = self.api_client.select_header_content_type(["application/json"]) + if _default_content_type is not None: + _header_params["Content-Type"] = _default_content_type + # authentication setting _auth_settings: List[str] = [] return self.api_client.param_serialize( - method="DELETE", - resource_path="/v1/projects/{projectId}/servers/{serverId}/volume-attachments/{volumeId}", + method="PATCH", + resource_path="/v2beta1/projects/{projectId}/regions/{region}/images/{imageId}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -28212,17 +35639,17 @@ def _remove_volume_from_server_serialize( ) @validate_call - def rescue_server( + def update_image_share( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - server_id: Annotated[ - str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Server."), + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + image_id: Annotated[ + str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Image.") ], - rescue_server_payload: Annotated[RescueServerPayload, Field(description="Request a server rescue.")], + update_image_share_payload: Annotated[UpdateImageSharePayload, Field(description="Update an Image Share.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -28232,17 +35659,19 @@ def rescue_server( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> None: - """Rescue an existing server. + ) -> ImageShare: + """Update image share. - Rescue an existing server. It is shutdown and the initial image is attached as the boot volume, while the boot volume is attached as secondary volume and the server is booted. + Update share of an Image. Projects will be appended to existing list. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str - :param server_id: The identifier (ID) of a STACKIT Server. (required) - :type server_id: str - :param rescue_server_payload: Request a server rescue. (required) - :type rescue_server_payload: RescueServerPayload + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param image_id: The identifier (ID) of a STACKIT Image. (required) + :type image_id: str + :param update_image_share_payload: Update an Image Share. (required) + :type update_image_share_payload: UpdateImageSharePayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -28265,10 +35694,11 @@ def rescue_server( :return: Returns the result object. """ # noqa: E501 - _param = self._rescue_server_serialize( + _param = self._update_image_share_serialize( project_id=project_id, - server_id=server_id, - rescue_server_payload=rescue_server_payload, + region=region, + image_id=image_id, + update_image_share_payload=update_image_share_payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -28276,12 +35706,11 @@ def rescue_server( ) _response_types_map: Dict[str, Optional[str]] = { - "202": None, + "200": "ImageShare", "400": "Error", "401": "Error", "403": "Error", "404": "Error", - "409": "Error", "500": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -28292,17 +35721,17 @@ def rescue_server( ).data @validate_call - def rescue_server_with_http_info( + def update_image_share_with_http_info( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - server_id: Annotated[ - str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Server."), + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + image_id: Annotated[ + str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Image.") ], - rescue_server_payload: Annotated[RescueServerPayload, Field(description="Request a server rescue.")], + update_image_share_payload: Annotated[UpdateImageSharePayload, Field(description="Update an Image Share.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -28312,17 +35741,19 @@ def rescue_server_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[None]: - """Rescue an existing server. + ) -> ApiResponse[ImageShare]: + """Update image share. - Rescue an existing server. It is shutdown and the initial image is attached as the boot volume, while the boot volume is attached as secondary volume and the server is booted. + Update share of an Image. Projects will be appended to existing list. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str - :param server_id: The identifier (ID) of a STACKIT Server. (required) - :type server_id: str - :param rescue_server_payload: Request a server rescue. (required) - :type rescue_server_payload: RescueServerPayload + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param image_id: The identifier (ID) of a STACKIT Image. (required) + :type image_id: str + :param update_image_share_payload: Update an Image Share. (required) + :type update_image_share_payload: UpdateImageSharePayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -28345,10 +35776,11 @@ def rescue_server_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._rescue_server_serialize( + _param = self._update_image_share_serialize( project_id=project_id, - server_id=server_id, - rescue_server_payload=rescue_server_payload, + region=region, + image_id=image_id, + update_image_share_payload=update_image_share_payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -28356,12 +35788,11 @@ def rescue_server_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "202": None, + "200": "ImageShare", "400": "Error", "401": "Error", "403": "Error", "404": "Error", - "409": "Error", "500": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -28372,17 +35803,17 @@ def rescue_server_with_http_info( ) @validate_call - def rescue_server_without_preload_content( + def update_image_share_without_preload_content( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - server_id: Annotated[ - str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Server."), + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + image_id: Annotated[ + str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Image.") ], - rescue_server_payload: Annotated[RescueServerPayload, Field(description="Request a server rescue.")], + update_image_share_payload: Annotated[UpdateImageSharePayload, Field(description="Update an Image Share.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -28393,16 +35824,18 @@ def rescue_server_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Rescue an existing server. + """Update image share. - Rescue an existing server. It is shutdown and the initial image is attached as the boot volume, while the boot volume is attached as secondary volume and the server is booted. + Update share of an Image. Projects will be appended to existing list. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str - :param server_id: The identifier (ID) of a STACKIT Server. (required) - :type server_id: str - :param rescue_server_payload: Request a server rescue. (required) - :type rescue_server_payload: RescueServerPayload + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param image_id: The identifier (ID) of a STACKIT Image. (required) + :type image_id: str + :param update_image_share_payload: Update an Image Share. (required) + :type update_image_share_payload: UpdateImageSharePayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -28425,10 +35858,11 @@ def rescue_server_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._rescue_server_serialize( + _param = self._update_image_share_serialize( project_id=project_id, - server_id=server_id, - rescue_server_payload=rescue_server_payload, + region=region, + image_id=image_id, + update_image_share_payload=update_image_share_payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -28436,22 +35870,22 @@ def rescue_server_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "202": None, + "200": "ImageShare", "400": "Error", "401": "Error", "403": "Error", "404": "Error", - "409": "Error", "500": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _rescue_server_serialize( + def _update_image_share_serialize( self, project_id, - server_id, - rescue_server_payload, + region, + image_id, + update_image_share_payload, _request_auth, _content_type, _headers, @@ -28472,14 +35906,16 @@ def _rescue_server_serialize( # process the path parameters if project_id is not None: _path_params["projectId"] = project_id - if server_id is not None: - _path_params["serverId"] = server_id + if region is not None: + _path_params["region"] = region + if image_id is not None: + _path_params["imageId"] = image_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - if rescue_server_payload is not None: - _body_params = rescue_server_payload + if update_image_share_payload is not None: + _body_params = update_image_share_payload # set the HTTP header `Accept` if "Accept" not in _header_params: @@ -28497,8 +35933,8 @@ def _rescue_server_serialize( _auth_settings: List[str] = [] return self.api_client.param_serialize( - method="POST", - resource_path="/v1/projects/{projectId}/servers/{serverId}/rescue", + method="PATCH", + resource_path="/v2beta1/projects/{projectId}/regions/{region}/images/{imageId}/share", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -28512,17 +35948,12 @@ def _rescue_server_serialize( ) @validate_call - def resize_server( + def update_key_pair( self, - project_id: Annotated[ - str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), - ], - server_id: Annotated[ - str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Server."), + keypair_name: Annotated[str, Field(strict=True, max_length=127, description="The name of an SSH keypair.")], + update_key_pair_payload: Annotated[ + UpdateKeyPairPayload, Field(description="Request an update of an SSH keypair.") ], - resize_server_payload: Annotated[ResizeServerPayload, Field(description="Request a resize of a server.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -28532,17 +35963,15 @@ def resize_server( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> None: - """Resize a server. + ) -> Keypair: + """Update information of an SSH keypair. - Resize the server to the given machine type. + Update labels of the SSH keypair. - :param project_id: The identifier (ID) of a STACKIT Project. (required) - :type project_id: str - :param server_id: The identifier (ID) of a STACKIT Server. (required) - :type server_id: str - :param resize_server_payload: Request a resize of a server. (required) - :type resize_server_payload: ResizeServerPayload + :param keypair_name: The name of an SSH keypair. (required) + :type keypair_name: str + :param update_key_pair_payload: Request an update of an SSH keypair. (required) + :type update_key_pair_payload: UpdateKeyPairPayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -28565,10 +35994,9 @@ def resize_server( :return: Returns the result object. """ # noqa: E501 - _param = self._resize_server_serialize( - project_id=project_id, - server_id=server_id, - resize_server_payload=resize_server_payload, + _param = self._update_key_pair_serialize( + keypair_name=keypair_name, + update_key_pair_payload=update_key_pair_payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -28576,12 +36004,11 @@ def resize_server( ) _response_types_map: Dict[str, Optional[str]] = { - "202": None, + "200": "Keypair", "400": "Error", "401": "Error", "403": "Error", "404": "Error", - "409": "Error", "500": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -28592,17 +36019,12 @@ def resize_server( ).data @validate_call - def resize_server_with_http_info( + def update_key_pair_with_http_info( self, - project_id: Annotated[ - str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), - ], - server_id: Annotated[ - str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Server."), + keypair_name: Annotated[str, Field(strict=True, max_length=127, description="The name of an SSH keypair.")], + update_key_pair_payload: Annotated[ + UpdateKeyPairPayload, Field(description="Request an update of an SSH keypair.") ], - resize_server_payload: Annotated[ResizeServerPayload, Field(description="Request a resize of a server.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -28612,17 +36034,15 @@ def resize_server_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[None]: - """Resize a server. + ) -> ApiResponse[Keypair]: + """Update information of an SSH keypair. - Resize the server to the given machine type. + Update labels of the SSH keypair. - :param project_id: The identifier (ID) of a STACKIT Project. (required) - :type project_id: str - :param server_id: The identifier (ID) of a STACKIT Server. (required) - :type server_id: str - :param resize_server_payload: Request a resize of a server. (required) - :type resize_server_payload: ResizeServerPayload + :param keypair_name: The name of an SSH keypair. (required) + :type keypair_name: str + :param update_key_pair_payload: Request an update of an SSH keypair. (required) + :type update_key_pair_payload: UpdateKeyPairPayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -28645,10 +36065,9 @@ def resize_server_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._resize_server_serialize( - project_id=project_id, - server_id=server_id, - resize_server_payload=resize_server_payload, + _param = self._update_key_pair_serialize( + keypair_name=keypair_name, + update_key_pair_payload=update_key_pair_payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -28656,12 +36075,11 @@ def resize_server_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "202": None, + "200": "Keypair", "400": "Error", "401": "Error", "403": "Error", "404": "Error", - "409": "Error", "500": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -28672,17 +36090,12 @@ def resize_server_with_http_info( ) @validate_call - def resize_server_without_preload_content( + def update_key_pair_without_preload_content( self, - project_id: Annotated[ - str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), - ], - server_id: Annotated[ - str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Server."), + keypair_name: Annotated[str, Field(strict=True, max_length=127, description="The name of an SSH keypair.")], + update_key_pair_payload: Annotated[ + UpdateKeyPairPayload, Field(description="Request an update of an SSH keypair.") ], - resize_server_payload: Annotated[ResizeServerPayload, Field(description="Request a resize of a server.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -28693,16 +36106,14 @@ def resize_server_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Resize a server. + """Update information of an SSH keypair. - Resize the server to the given machine type. + Update labels of the SSH keypair. - :param project_id: The identifier (ID) of a STACKIT Project. (required) - :type project_id: str - :param server_id: The identifier (ID) of a STACKIT Server. (required) - :type server_id: str - :param resize_server_payload: Request a resize of a server. (required) - :type resize_server_payload: ResizeServerPayload + :param keypair_name: The name of an SSH keypair. (required) + :type keypair_name: str + :param update_key_pair_payload: Request an update of an SSH keypair. (required) + :type update_key_pair_payload: UpdateKeyPairPayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -28725,10 +36136,9 @@ def resize_server_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._resize_server_serialize( - project_id=project_id, - server_id=server_id, - resize_server_payload=resize_server_payload, + _param = self._update_key_pair_serialize( + keypair_name=keypair_name, + update_key_pair_payload=update_key_pair_payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -28736,22 +36146,20 @@ def resize_server_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "202": None, + "200": "Keypair", "400": "Error", "401": "Error", "403": "Error", "404": "Error", - "409": "Error", "500": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _resize_server_serialize( + def _update_key_pair_serialize( self, - project_id, - server_id, - resize_server_payload, + keypair_name, + update_key_pair_payload, _request_auth, _content_type, _headers, @@ -28770,16 +36178,14 @@ def _resize_server_serialize( _body_params: Optional[bytes] = None # process the path parameters - if project_id is not None: - _path_params["projectId"] = project_id - if server_id is not None: - _path_params["serverId"] = server_id + if keypair_name is not None: + _path_params["keypairName"] = keypair_name # process the query parameters # process the header parameters # process the form parameters # process the body parameter - if resize_server_payload is not None: - _body_params = resize_server_payload + if update_key_pair_payload is not None: + _body_params = update_key_pair_payload # set the HTTP header `Accept` if "Accept" not in _header_params: @@ -28797,8 +36203,8 @@ def _resize_server_serialize( _auth_settings: List[str] = [] return self.api_client.param_serialize( - method="POST", - resource_path="/v1/projects/{projectId}/servers/{serverId}/resize", + method="PATCH", + resource_path="/v2beta1/keypairs/{keypairName}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -28812,19 +36218,19 @@ def _resize_server_serialize( ) @validate_call - def resize_volume( + def update_management_network_route( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - volume_id: Annotated[ - str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Volume."), + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + route_id: Annotated[ + str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Route.") + ], + update_management_network_route_payload: Annotated[ + UpdateManagementNetworkRoutePayload, Field(description="Request an update of a management network route.") ], - resize_volume_payload: Annotated[ - Optional[ResizeVolumePayload], Field(description="Request a volume resize.") - ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -28834,17 +36240,19 @@ def resize_volume( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> None: - """Update the size of a volume. + ) -> ManagementRoute: + """Update a management network route labels. - Update the size of a block device volume. The new volume size must be larger than the current size. + Update the labels of a management network route. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str - :param volume_id: The identifier (ID) of a STACKIT Volume. (required) - :type volume_id: str - :param resize_volume_payload: Request a volume resize. - :type resize_volume_payload: ResizeVolumePayload + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param route_id: The identifier (ID) of a STACKIT Route. (required) + :type route_id: str + :param update_management_network_route_payload: Request an update of a management network route. (required) + :type update_management_network_route_payload: UpdateManagementNetworkRoutePayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -28867,10 +36275,11 @@ def resize_volume( :return: Returns the result object. """ # noqa: E501 - _param = self._resize_volume_serialize( + _param = self._update_management_network_route_serialize( project_id=project_id, - volume_id=volume_id, - resize_volume_payload=resize_volume_payload, + region=region, + route_id=route_id, + update_management_network_route_payload=update_management_network_route_payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -28878,12 +36287,11 @@ def resize_volume( ) _response_types_map: Dict[str, Optional[str]] = { - "202": None, + "200": "ManagementRoute", "400": "Error", "401": "Error", "403": "Error", "404": "Error", - "409": "Error", "500": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -28894,19 +36302,19 @@ def resize_volume( ).data @validate_call - def resize_volume_with_http_info( + def update_management_network_route_with_http_info( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - volume_id: Annotated[ - str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Volume."), + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + route_id: Annotated[ + str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Route.") + ], + update_management_network_route_payload: Annotated[ + UpdateManagementNetworkRoutePayload, Field(description="Request an update of a management network route.") ], - resize_volume_payload: Annotated[ - Optional[ResizeVolumePayload], Field(description="Request a volume resize.") - ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -28916,17 +36324,19 @@ def resize_volume_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[None]: - """Update the size of a volume. + ) -> ApiResponse[ManagementRoute]: + """Update a management network route labels. - Update the size of a block device volume. The new volume size must be larger than the current size. + Update the labels of a management network route. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str - :param volume_id: The identifier (ID) of a STACKIT Volume. (required) - :type volume_id: str - :param resize_volume_payload: Request a volume resize. - :type resize_volume_payload: ResizeVolumePayload + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param route_id: The identifier (ID) of a STACKIT Route. (required) + :type route_id: str + :param update_management_network_route_payload: Request an update of a management network route. (required) + :type update_management_network_route_payload: UpdateManagementNetworkRoutePayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -28949,10 +36359,11 @@ def resize_volume_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._resize_volume_serialize( + _param = self._update_management_network_route_serialize( project_id=project_id, - volume_id=volume_id, - resize_volume_payload=resize_volume_payload, + region=region, + route_id=route_id, + update_management_network_route_payload=update_management_network_route_payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -28960,12 +36371,11 @@ def resize_volume_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "202": None, + "200": "ManagementRoute", "400": "Error", "401": "Error", "403": "Error", "404": "Error", - "409": "Error", "500": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -28976,19 +36386,19 @@ def resize_volume_with_http_info( ) @validate_call - def resize_volume_without_preload_content( + def update_management_network_route_without_preload_content( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - volume_id: Annotated[ - str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Volume."), + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + route_id: Annotated[ + str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Route.") + ], + update_management_network_route_payload: Annotated[ + UpdateManagementNetworkRoutePayload, Field(description="Request an update of a management network route.") ], - resize_volume_payload: Annotated[ - Optional[ResizeVolumePayload], Field(description="Request a volume resize.") - ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -28999,16 +36409,18 @@ def resize_volume_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Update the size of a volume. + """Update a management network route labels. - Update the size of a block device volume. The new volume size must be larger than the current size. + Update the labels of a management network route. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str - :param volume_id: The identifier (ID) of a STACKIT Volume. (required) - :type volume_id: str - :param resize_volume_payload: Request a volume resize. - :type resize_volume_payload: ResizeVolumePayload + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param route_id: The identifier (ID) of a STACKIT Route. (required) + :type route_id: str + :param update_management_network_route_payload: Request an update of a management network route. (required) + :type update_management_network_route_payload: UpdateManagementNetworkRoutePayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -29031,10 +36443,11 @@ def resize_volume_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._resize_volume_serialize( + _param = self._update_management_network_route_serialize( project_id=project_id, - volume_id=volume_id, - resize_volume_payload=resize_volume_payload, + region=region, + route_id=route_id, + update_management_network_route_payload=update_management_network_route_payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -29042,22 +36455,22 @@ def resize_volume_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "202": None, + "200": "ManagementRoute", "400": "Error", "401": "Error", "403": "Error", "404": "Error", - "409": "Error", "500": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _resize_volume_serialize( + def _update_management_network_route_serialize( self, project_id, - volume_id, - resize_volume_payload, + region, + route_id, + update_management_network_route_payload, _request_auth, _content_type, _headers, @@ -29078,14 +36491,16 @@ def _resize_volume_serialize( # process the path parameters if project_id is not None: _path_params["projectId"] = project_id - if volume_id is not None: - _path_params["volumeId"] = volume_id + if region is not None: + _path_params["region"] = region + if route_id is not None: + _path_params["routeId"] = route_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - if resize_volume_payload is not None: - _body_params = resize_volume_payload + if update_management_network_route_payload is not None: + _body_params = update_management_network_route_payload # set the HTTP header `Accept` if "Accept" not in _header_params: @@ -29103,8 +36518,8 @@ def _resize_volume_serialize( _auth_settings: List[str] = [] return self.api_client.param_serialize( - method="POST", - resource_path="/v1/projects/{projectId}/volumes/{volumeId}/resize", + method="PATCH", + resource_path="/v2beta1/projects/{projectId}/regions/{region}/management-network/routes/{routeId}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -29118,16 +36533,22 @@ def _resize_volume_serialize( ) @validate_call - def restore_backup( + def update_nic( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - backup_id: Annotated[ + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + network_id: Annotated[ str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Backup."), + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Network."), + ], + nic_id: Annotated[ + str, + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a network interface."), ], + update_nic_payload: Annotated[UpdateNicPayload, Field(description="Request an update of a network interface.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -29137,15 +36558,21 @@ def restore_backup( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> None: - """Restore Backup to the referenced source Volume. + ) -> NIC: + """Update a network interface. - Restores a Backup to the existing Volume it references to. The use of this endpoint is disruptive as the volume needs to be detached. If a new volume is to be created use the volumes endpoint with the option to create from backup. + Update the properties of an existing network interface inside a network. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str - :param backup_id: The identifier (ID) of a STACKIT Backup. (required) - :type backup_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param network_id: The identifier (ID) of a STACKIT Network. (required) + :type network_id: str + :param nic_id: The identifier (ID) of a network interface. (required) + :type nic_id: str + :param update_nic_payload: Request an update of a network interface. (required) + :type update_nic_payload: UpdateNicPayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -29168,9 +36595,12 @@ def restore_backup( :return: Returns the result object. """ # noqa: E501 - _param = self._restore_backup_serialize( + _param = self._update_nic_serialize( project_id=project_id, - backup_id=backup_id, + region=region, + network_id=network_id, + nic_id=nic_id, + update_nic_payload=update_nic_payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -29178,11 +36608,12 @@ def restore_backup( ) _response_types_map: Dict[str, Optional[str]] = { - "202": None, + "200": "NIC", "400": "Error", "401": "Error", "403": "Error", "404": "Error", + "409": "Error", "500": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -29193,16 +36624,22 @@ def restore_backup( ).data @validate_call - def restore_backup_with_http_info( + def update_nic_with_http_info( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - backup_id: Annotated[ + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + network_id: Annotated[ str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Backup."), + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Network."), ], + nic_id: Annotated[ + str, + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a network interface."), + ], + update_nic_payload: Annotated[UpdateNicPayload, Field(description="Request an update of a network interface.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -29212,15 +36649,21 @@ def restore_backup_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[None]: - """Restore Backup to the referenced source Volume. + ) -> ApiResponse[NIC]: + """Update a network interface. - Restores a Backup to the existing Volume it references to. The use of this endpoint is disruptive as the volume needs to be detached. If a new volume is to be created use the volumes endpoint with the option to create from backup. + Update the properties of an existing network interface inside a network. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str - :param backup_id: The identifier (ID) of a STACKIT Backup. (required) - :type backup_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param network_id: The identifier (ID) of a STACKIT Network. (required) + :type network_id: str + :param nic_id: The identifier (ID) of a network interface. (required) + :type nic_id: str + :param update_nic_payload: Request an update of a network interface. (required) + :type update_nic_payload: UpdateNicPayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -29243,9 +36686,12 @@ def restore_backup_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._restore_backup_serialize( + _param = self._update_nic_serialize( project_id=project_id, - backup_id=backup_id, + region=region, + network_id=network_id, + nic_id=nic_id, + update_nic_payload=update_nic_payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -29253,11 +36699,12 @@ def restore_backup_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "202": None, + "200": "NIC", "400": "Error", "401": "Error", "403": "Error", "404": "Error", + "409": "Error", "500": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -29268,16 +36715,22 @@ def restore_backup_with_http_info( ) @validate_call - def restore_backup_without_preload_content( + def update_nic_without_preload_content( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - backup_id: Annotated[ + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + network_id: Annotated[ str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Backup."), + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Network."), ], + nic_id: Annotated[ + str, + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a network interface."), + ], + update_nic_payload: Annotated[UpdateNicPayload, Field(description="Request an update of a network interface.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -29288,14 +36741,20 @@ def restore_backup_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Restore Backup to the referenced source Volume. + """Update a network interface. - Restores a Backup to the existing Volume it references to. The use of this endpoint is disruptive as the volume needs to be detached. If a new volume is to be created use the volumes endpoint with the option to create from backup. + Update the properties of an existing network interface inside a network. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str - :param backup_id: The identifier (ID) of a STACKIT Backup. (required) - :type backup_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param network_id: The identifier (ID) of a STACKIT Network. (required) + :type network_id: str + :param nic_id: The identifier (ID) of a network interface. (required) + :type nic_id: str + :param update_nic_payload: Request an update of a network interface. (required) + :type update_nic_payload: UpdateNicPayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -29318,9 +36777,12 @@ def restore_backup_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._restore_backup_serialize( + _param = self._update_nic_serialize( project_id=project_id, - backup_id=backup_id, + region=region, + network_id=network_id, + nic_id=nic_id, + update_nic_payload=update_nic_payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -29328,20 +36790,24 @@ def restore_backup_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "202": None, + "200": "NIC", "400": "Error", "401": "Error", "403": "Error", "404": "Error", + "409": "Error", "500": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _restore_backup_serialize( + def _update_nic_serialize( self, project_id, - backup_id, + region, + network_id, + nic_id, + update_nic_payload, _request_auth, _content_type, _headers, @@ -29362,23 +36828,37 @@ def _restore_backup_serialize( # process the path parameters if project_id is not None: _path_params["projectId"] = project_id - if backup_id is not None: - _path_params["backupId"] = backup_id + if region is not None: + _path_params["region"] = region + if network_id is not None: + _path_params["networkId"] = network_id + if nic_id is not None: + _path_params["nicId"] = nic_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + if update_nic_payload is not None: + _body_params = update_nic_payload # set the HTTP header `Accept` if "Accept" not in _header_params: _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + # set the HTTP header `Content-Type` + if _content_type: + _header_params["Content-Type"] = _content_type + else: + _default_content_type = self.api_client.select_header_content_type(["application/json"]) + if _default_content_type is not None: + _header_params["Content-Type"] = _default_content_type + # authentication setting _auth_settings: List[str] = [] return self.api_client.param_serialize( - method="POST", - resource_path="/v1/projects/{projectId}/backups/{backupId}/restore", + method="PATCH", + resource_path="/v2beta1/projects/{projectId}/regions/{region}/networks/{networkId}/nics/{nicId}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -29392,16 +36872,19 @@ def _restore_backup_serialize( ) @validate_call - def set_image_share( + def update_public_ip( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - image_id: Annotated[ - str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Image.") + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + public_ip_id: Annotated[ + str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a Public IP.") + ], + update_public_ip_payload: Annotated[ + UpdatePublicIPPayload, Field(description="Request an update of a public IP.") ], - set_image_share_payload: Annotated[SetImageSharePayload, Field(description="Settings for an Image Share.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -29411,17 +36894,19 @@ def set_image_share( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ImageShare: - """Set image share. + ) -> PublicIp: + """Update a public IP. - Set share of an Image. New Options will replace existing settings. + Update the properties of an existing public IP inside a project. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str - :param image_id: The identifier (ID) of a STACKIT Image. (required) - :type image_id: str - :param set_image_share_payload: Settings for an Image Share. (required) - :type set_image_share_payload: SetImageSharePayload + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param public_ip_id: The identifier (ID) of a Public IP. (required) + :type public_ip_id: str + :param update_public_ip_payload: Request an update of a public IP. (required) + :type update_public_ip_payload: UpdatePublicIPPayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -29444,10 +36929,11 @@ def set_image_share( :return: Returns the result object. """ # noqa: E501 - _param = self._set_image_share_serialize( + _param = self._update_public_ip_serialize( project_id=project_id, - image_id=image_id, - set_image_share_payload=set_image_share_payload, + region=region, + public_ip_id=public_ip_id, + update_public_ip_payload=update_public_ip_payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -29455,7 +36941,7 @@ def set_image_share( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ImageShare", + "200": "PublicIp", "400": "Error", "401": "Error", "403": "Error", @@ -29470,16 +36956,19 @@ def set_image_share( ).data @validate_call - def set_image_share_with_http_info( + def update_public_ip_with_http_info( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - image_id: Annotated[ - str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Image.") + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + public_ip_id: Annotated[ + str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a Public IP.") + ], + update_public_ip_payload: Annotated[ + UpdatePublicIPPayload, Field(description="Request an update of a public IP.") ], - set_image_share_payload: Annotated[SetImageSharePayload, Field(description="Settings for an Image Share.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -29489,17 +36978,19 @@ def set_image_share_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[ImageShare]: - """Set image share. + ) -> ApiResponse[PublicIp]: + """Update a public IP. - Set share of an Image. New Options will replace existing settings. + Update the properties of an existing public IP inside a project. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str - :param image_id: The identifier (ID) of a STACKIT Image. (required) - :type image_id: str - :param set_image_share_payload: Settings for an Image Share. (required) - :type set_image_share_payload: SetImageSharePayload + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param public_ip_id: The identifier (ID) of a Public IP. (required) + :type public_ip_id: str + :param update_public_ip_payload: Request an update of a public IP. (required) + :type update_public_ip_payload: UpdatePublicIPPayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -29522,10 +37013,11 @@ def set_image_share_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._set_image_share_serialize( + _param = self._update_public_ip_serialize( project_id=project_id, - image_id=image_id, - set_image_share_payload=set_image_share_payload, + region=region, + public_ip_id=public_ip_id, + update_public_ip_payload=update_public_ip_payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -29533,7 +37025,7 @@ def set_image_share_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ImageShare", + "200": "PublicIp", "400": "Error", "401": "Error", "403": "Error", @@ -29548,16 +37040,19 @@ def set_image_share_with_http_info( ) @validate_call - def set_image_share_without_preload_content( + def update_public_ip_without_preload_content( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - image_id: Annotated[ - str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Image.") + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + public_ip_id: Annotated[ + str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a Public IP.") + ], + update_public_ip_payload: Annotated[ + UpdatePublicIPPayload, Field(description="Request an update of a public IP.") ], - set_image_share_payload: Annotated[SetImageSharePayload, Field(description="Settings for an Image Share.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -29568,16 +37063,18 @@ def set_image_share_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Set image share. + """Update a public IP. - Set share of an Image. New Options will replace existing settings. + Update the properties of an existing public IP inside a project. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str - :param image_id: The identifier (ID) of a STACKIT Image. (required) - :type image_id: str - :param set_image_share_payload: Settings for an Image Share. (required) - :type set_image_share_payload: SetImageSharePayload + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param public_ip_id: The identifier (ID) of a Public IP. (required) + :type public_ip_id: str + :param update_public_ip_payload: Request an update of a public IP. (required) + :type update_public_ip_payload: UpdatePublicIPPayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -29600,10 +37097,11 @@ def set_image_share_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._set_image_share_serialize( + _param = self._update_public_ip_serialize( project_id=project_id, - image_id=image_id, - set_image_share_payload=set_image_share_payload, + region=region, + public_ip_id=public_ip_id, + update_public_ip_payload=update_public_ip_payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -29611,7 +37109,7 @@ def set_image_share_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ImageShare", + "200": "PublicIp", "400": "Error", "401": "Error", "403": "Error", @@ -29621,11 +37119,12 @@ def set_image_share_without_preload_content( response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _set_image_share_serialize( + def _update_public_ip_serialize( self, project_id, - image_id, - set_image_share_payload, + region, + public_ip_id, + update_public_ip_payload, _request_auth, _content_type, _headers, @@ -29646,14 +37145,16 @@ def _set_image_share_serialize( # process the path parameters if project_id is not None: _path_params["projectId"] = project_id - if image_id is not None: - _path_params["imageId"] = image_id + if region is not None: + _path_params["region"] = region + if public_ip_id is not None: + _path_params["publicIpId"] = public_ip_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - if set_image_share_payload is not None: - _body_params = set_image_share_payload + if update_public_ip_payload is not None: + _body_params = update_public_ip_payload # set the HTTP header `Accept` if "Accept" not in _header_params: @@ -29671,8 +37172,8 @@ def _set_image_share_serialize( _auth_settings: List[str] = [] return self.api_client.param_serialize( - method="PUT", - resource_path="/v1/projects/{projectId}/images/{imageId}/share", + method="PATCH", + resource_path="/v2beta1/projects/{projectId}/regions/{region}/public-ips/{publicIpId}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -29686,15 +37187,32 @@ def _set_image_share_serialize( ) @validate_call - def start_server( + def update_route_of_routing_table( self, - project_id: Annotated[ + organization_id: Annotated[ str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), + Field( + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Organization." + ), ], - server_id: Annotated[ + area_id: Annotated[ str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Server."), + Field( + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Network Area." + ), + ], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + routing_table_id: Annotated[ + str, + Field( + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Routing Table." + ), + ], + route_id: Annotated[ + str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Route.") + ], + update_route_of_routing_table_payload: Annotated[ + UpdateRouteOfRoutingTablePayload, Field(description="Request an update of a route in a routing table.") ], _request_timeout: Union[ None, @@ -29705,15 +37223,23 @@ def start_server( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> None: - """Boot up a server. + ) -> Route: + """Update a route of a routing table. - Start an existing server or allocates the server if deallocated. + Update a route defined in a routing table. - :param project_id: The identifier (ID) of a STACKIT Project. (required) - :type project_id: str - :param server_id: The identifier (ID) of a STACKIT Server. (required) - :type server_id: str + :param organization_id: The identifier (ID) of a STACKIT Organization. (required) + :type organization_id: str + :param area_id: The identifier (ID) of a STACKIT Network Area. (required) + :type area_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param routing_table_id: The identifier (ID) of a STACKIT Routing Table. (required) + :type routing_table_id: str + :param route_id: The identifier (ID) of a STACKIT Route. (required) + :type route_id: str + :param update_route_of_routing_table_payload: Request an update of a route in a routing table. (required) + :type update_route_of_routing_table_payload: UpdateRouteOfRoutingTablePayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -29736,9 +37262,13 @@ def start_server( :return: Returns the result object. """ # noqa: E501 - _param = self._start_server_serialize( - project_id=project_id, - server_id=server_id, + _param = self._update_route_of_routing_table_serialize( + organization_id=organization_id, + area_id=area_id, + region=region, + routing_table_id=routing_table_id, + route_id=route_id, + update_route_of_routing_table_payload=update_route_of_routing_table_payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -29746,12 +37276,11 @@ def start_server( ) _response_types_map: Dict[str, Optional[str]] = { - "202": None, + "200": "Route", "400": "Error", "401": "Error", "403": "Error", "404": "Error", - "409": "Error", "500": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -29762,15 +37291,32 @@ def start_server( ).data @validate_call - def start_server_with_http_info( + def update_route_of_routing_table_with_http_info( self, - project_id: Annotated[ + organization_id: Annotated[ str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), + Field( + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Organization." + ), ], - server_id: Annotated[ + area_id: Annotated[ str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Server."), + Field( + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Network Area." + ), + ], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + routing_table_id: Annotated[ + str, + Field( + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Routing Table." + ), + ], + route_id: Annotated[ + str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Route.") + ], + update_route_of_routing_table_payload: Annotated[ + UpdateRouteOfRoutingTablePayload, Field(description="Request an update of a route in a routing table.") ], _request_timeout: Union[ None, @@ -29781,15 +37327,23 @@ def start_server_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[None]: - """Boot up a server. + ) -> ApiResponse[Route]: + """Update a route of a routing table. - Start an existing server or allocates the server if deallocated. + Update a route defined in a routing table. - :param project_id: The identifier (ID) of a STACKIT Project. (required) - :type project_id: str - :param server_id: The identifier (ID) of a STACKIT Server. (required) - :type server_id: str + :param organization_id: The identifier (ID) of a STACKIT Organization. (required) + :type organization_id: str + :param area_id: The identifier (ID) of a STACKIT Network Area. (required) + :type area_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param routing_table_id: The identifier (ID) of a STACKIT Routing Table. (required) + :type routing_table_id: str + :param route_id: The identifier (ID) of a STACKIT Route. (required) + :type route_id: str + :param update_route_of_routing_table_payload: Request an update of a route in a routing table. (required) + :type update_route_of_routing_table_payload: UpdateRouteOfRoutingTablePayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -29812,9 +37366,13 @@ def start_server_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._start_server_serialize( - project_id=project_id, - server_id=server_id, + _param = self._update_route_of_routing_table_serialize( + organization_id=organization_id, + area_id=area_id, + region=region, + routing_table_id=routing_table_id, + route_id=route_id, + update_route_of_routing_table_payload=update_route_of_routing_table_payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -29822,12 +37380,11 @@ def start_server_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "202": None, + "200": "Route", "400": "Error", "401": "Error", "403": "Error", "404": "Error", - "409": "Error", "500": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -29838,15 +37395,32 @@ def start_server_with_http_info( ) @validate_call - def start_server_without_preload_content( + def update_route_of_routing_table_without_preload_content( self, - project_id: Annotated[ + organization_id: Annotated[ str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), + Field( + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Organization." + ), ], - server_id: Annotated[ + area_id: Annotated[ str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Server."), + Field( + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Network Area." + ), + ], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + routing_table_id: Annotated[ + str, + Field( + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Routing Table." + ), + ], + route_id: Annotated[ + str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Route.") + ], + update_route_of_routing_table_payload: Annotated[ + UpdateRouteOfRoutingTablePayload, Field(description="Request an update of a route in a routing table.") ], _request_timeout: Union[ None, @@ -29858,14 +37432,22 @@ def start_server_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Boot up a server. + """Update a route of a routing table. - Start an existing server or allocates the server if deallocated. + Update a route defined in a routing table. - :param project_id: The identifier (ID) of a STACKIT Project. (required) - :type project_id: str - :param server_id: The identifier (ID) of a STACKIT Server. (required) - :type server_id: str + :param organization_id: The identifier (ID) of a STACKIT Organization. (required) + :type organization_id: str + :param area_id: The identifier (ID) of a STACKIT Network Area. (required) + :type area_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param routing_table_id: The identifier (ID) of a STACKIT Routing Table. (required) + :type routing_table_id: str + :param route_id: The identifier (ID) of a STACKIT Route. (required) + :type route_id: str + :param update_route_of_routing_table_payload: Request an update of a route in a routing table. (required) + :type update_route_of_routing_table_payload: UpdateRouteOfRoutingTablePayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -29888,9 +37470,13 @@ def start_server_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._start_server_serialize( - project_id=project_id, - server_id=server_id, + _param = self._update_route_of_routing_table_serialize( + organization_id=organization_id, + area_id=area_id, + region=region, + routing_table_id=routing_table_id, + route_id=route_id, + update_route_of_routing_table_payload=update_route_of_routing_table_payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -29898,21 +37484,24 @@ def start_server_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "202": None, + "200": "Route", "400": "Error", "401": "Error", "403": "Error", "404": "Error", - "409": "Error", "500": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _start_server_serialize( + def _update_route_of_routing_table_serialize( self, - project_id, - server_id, + organization_id, + area_id, + region, + routing_table_id, + route_id, + update_route_of_routing_table_payload, _request_auth, _content_type, _headers, @@ -29931,25 +37520,41 @@ def _start_server_serialize( _body_params: Optional[bytes] = None # process the path parameters - if project_id is not None: - _path_params["projectId"] = project_id - if server_id is not None: - _path_params["serverId"] = server_id + if organization_id is not None: + _path_params["organizationId"] = organization_id + if area_id is not None: + _path_params["areaId"] = area_id + if region is not None: + _path_params["region"] = region + if routing_table_id is not None: + _path_params["routingTableId"] = routing_table_id + if route_id is not None: + _path_params["routeId"] = route_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + if update_route_of_routing_table_payload is not None: + _body_params = update_route_of_routing_table_payload # set the HTTP header `Accept` if "Accept" not in _header_params: _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + # set the HTTP header `Content-Type` + if _content_type: + _header_params["Content-Type"] = _content_type + else: + _default_content_type = self.api_client.select_header_content_type(["application/json"]) + if _default_content_type is not None: + _header_params["Content-Type"] = _default_content_type + # authentication setting _auth_settings: List[str] = [] return self.api_client.param_serialize( - method="POST", - resource_path="/v1/projects/{projectId}/servers/{serverId}/start", + method="PATCH", + resource_path="/v2beta1/organizations/{organizationId}/network-areas/{areaId}/regions/{region}/routing-tables/{routingTableId}/routes/{routeId}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -29963,15 +37568,29 @@ def _start_server_serialize( ) @validate_call - def stop_server( + def update_routing_table_of_area( self, - project_id: Annotated[ + organization_id: Annotated[ str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), + Field( + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Organization." + ), ], - server_id: Annotated[ + area_id: Annotated[ str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Server."), + Field( + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Network Area." + ), + ], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + routing_table_id: Annotated[ + str, + Field( + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Routing Table." + ), + ], + update_routing_table_of_area_payload: Annotated[ + UpdateRoutingTableOfAreaPayload, Field(description="Request an update of a routing table.") ], _request_timeout: Union[ None, @@ -29982,15 +37601,21 @@ def stop_server( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> None: - """Stop an existing server. + ) -> RoutingTable: + """Update a routing table. - Stops an existing server. The server will remain on the Hypervisor and will be charged full price for all resources attached to it. The attached resources will remain reserved. Useful particularly for vGPU servers. + Update a routing table defined in a network area. - :param project_id: The identifier (ID) of a STACKIT Project. (required) - :type project_id: str - :param server_id: The identifier (ID) of a STACKIT Server. (required) - :type server_id: str + :param organization_id: The identifier (ID) of a STACKIT Organization. (required) + :type organization_id: str + :param area_id: The identifier (ID) of a STACKIT Network Area. (required) + :type area_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param routing_table_id: The identifier (ID) of a STACKIT Routing Table. (required) + :type routing_table_id: str + :param update_routing_table_of_area_payload: Request an update of a routing table. (required) + :type update_routing_table_of_area_payload: UpdateRoutingTableOfAreaPayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -30013,9 +37638,12 @@ def stop_server( :return: Returns the result object. """ # noqa: E501 - _param = self._stop_server_serialize( - project_id=project_id, - server_id=server_id, + _param = self._update_routing_table_of_area_serialize( + organization_id=organization_id, + area_id=area_id, + region=region, + routing_table_id=routing_table_id, + update_routing_table_of_area_payload=update_routing_table_of_area_payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -30023,12 +37651,11 @@ def stop_server( ) _response_types_map: Dict[str, Optional[str]] = { - "202": None, + "200": "RoutingTable", "400": "Error", "401": "Error", "403": "Error", "404": "Error", - "409": "Error", "500": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -30039,15 +37666,29 @@ def stop_server( ).data @validate_call - def stop_server_with_http_info( + def update_routing_table_of_area_with_http_info( self, - project_id: Annotated[ + organization_id: Annotated[ str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), + Field( + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Organization." + ), ], - server_id: Annotated[ + area_id: Annotated[ str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Server."), + Field( + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Network Area." + ), + ], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + routing_table_id: Annotated[ + str, + Field( + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Routing Table." + ), + ], + update_routing_table_of_area_payload: Annotated[ + UpdateRoutingTableOfAreaPayload, Field(description="Request an update of a routing table.") ], _request_timeout: Union[ None, @@ -30058,15 +37699,21 @@ def stop_server_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[None]: - """Stop an existing server. + ) -> ApiResponse[RoutingTable]: + """Update a routing table. - Stops an existing server. The server will remain on the Hypervisor and will be charged full price for all resources attached to it. The attached resources will remain reserved. Useful particularly for vGPU servers. + Update a routing table defined in a network area. - :param project_id: The identifier (ID) of a STACKIT Project. (required) - :type project_id: str - :param server_id: The identifier (ID) of a STACKIT Server. (required) - :type server_id: str + :param organization_id: The identifier (ID) of a STACKIT Organization. (required) + :type organization_id: str + :param area_id: The identifier (ID) of a STACKIT Network Area. (required) + :type area_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param routing_table_id: The identifier (ID) of a STACKIT Routing Table. (required) + :type routing_table_id: str + :param update_routing_table_of_area_payload: Request an update of a routing table. (required) + :type update_routing_table_of_area_payload: UpdateRoutingTableOfAreaPayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -30089,9 +37736,12 @@ def stop_server_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._stop_server_serialize( - project_id=project_id, - server_id=server_id, + _param = self._update_routing_table_of_area_serialize( + organization_id=organization_id, + area_id=area_id, + region=region, + routing_table_id=routing_table_id, + update_routing_table_of_area_payload=update_routing_table_of_area_payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -30099,12 +37749,11 @@ def stop_server_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "202": None, + "200": "RoutingTable", "400": "Error", "401": "Error", "403": "Error", "404": "Error", - "409": "Error", "500": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -30115,15 +37764,29 @@ def stop_server_with_http_info( ) @validate_call - def stop_server_without_preload_content( + def update_routing_table_of_area_without_preload_content( self, - project_id: Annotated[ + organization_id: Annotated[ str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), + Field( + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Organization." + ), ], - server_id: Annotated[ + area_id: Annotated[ str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Server."), + Field( + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Network Area." + ), + ], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + routing_table_id: Annotated[ + str, + Field( + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Routing Table." + ), + ], + update_routing_table_of_area_payload: Annotated[ + UpdateRoutingTableOfAreaPayload, Field(description="Request an update of a routing table.") ], _request_timeout: Union[ None, @@ -30135,14 +37798,20 @@ def stop_server_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Stop an existing server. + """Update a routing table. - Stops an existing server. The server will remain on the Hypervisor and will be charged full price for all resources attached to it. The attached resources will remain reserved. Useful particularly for vGPU servers. + Update a routing table defined in a network area. - :param project_id: The identifier (ID) of a STACKIT Project. (required) - :type project_id: str - :param server_id: The identifier (ID) of a STACKIT Server. (required) - :type server_id: str + :param organization_id: The identifier (ID) of a STACKIT Organization. (required) + :type organization_id: str + :param area_id: The identifier (ID) of a STACKIT Network Area. (required) + :type area_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param routing_table_id: The identifier (ID) of a STACKIT Routing Table. (required) + :type routing_table_id: str + :param update_routing_table_of_area_payload: Request an update of a routing table. (required) + :type update_routing_table_of_area_payload: UpdateRoutingTableOfAreaPayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -30165,9 +37834,12 @@ def stop_server_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._stop_server_serialize( - project_id=project_id, - server_id=server_id, + _param = self._update_routing_table_of_area_serialize( + organization_id=organization_id, + area_id=area_id, + region=region, + routing_table_id=routing_table_id, + update_routing_table_of_area_payload=update_routing_table_of_area_payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -30175,21 +37847,23 @@ def stop_server_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "202": None, + "200": "RoutingTable", "400": "Error", "401": "Error", "403": "Error", "404": "Error", - "409": "Error", "500": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _stop_server_serialize( + def _update_routing_table_of_area_serialize( self, - project_id, - server_id, + organization_id, + area_id, + region, + routing_table_id, + update_routing_table_of_area_payload, _request_auth, _content_type, _headers, @@ -30208,25 +37882,39 @@ def _stop_server_serialize( _body_params: Optional[bytes] = None # process the path parameters - if project_id is not None: - _path_params["projectId"] = project_id - if server_id is not None: - _path_params["serverId"] = server_id + if organization_id is not None: + _path_params["organizationId"] = organization_id + if area_id is not None: + _path_params["areaId"] = area_id + if region is not None: + _path_params["region"] = region + if routing_table_id is not None: + _path_params["routingTableId"] = routing_table_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + if update_routing_table_of_area_payload is not None: + _body_params = update_routing_table_of_area_payload # set the HTTP header `Accept` if "Accept" not in _header_params: _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + # set the HTTP header `Content-Type` + if _content_type: + _header_params["Content-Type"] = _content_type + else: + _default_content_type = self.api_client.select_header_content_type(["application/json"]) + if _default_content_type is not None: + _header_params["Content-Type"] = _default_content_type + # authentication setting _auth_settings: List[str] = [] return self.api_client.param_serialize( - method="POST", - resource_path="/v1/projects/{projectId}/servers/{serverId}/stop", + method="PATCH", + resource_path="/v2beta1/organizations/{organizationId}/network-areas/{areaId}/regions/{region}/routing-tables/{routingTableId}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -30240,16 +37928,18 @@ def _stop_server_serialize( ) @validate_call - def unrescue_server( + def update_server( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], server_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Server."), ], + update_server_payload: Annotated[UpdateServerPayload, Field(description="Request an update of a server.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -30259,15 +37949,19 @@ def unrescue_server( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> None: - """Unrescue an existing server. + ) -> Server: + """Update information of a server. - Unrescue an existing server. The original boot volume is attached as boot volume of the server and the server is booted up. + Update name or labels of the server. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str :param server_id: The identifier (ID) of a STACKIT Server. (required) :type server_id: str + :param update_server_payload: Request an update of a server. (required) + :type update_server_payload: UpdateServerPayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -30290,9 +37984,11 @@ def unrescue_server( :return: Returns the result object. """ # noqa: E501 - _param = self._unrescue_server_serialize( + _param = self._update_server_serialize( project_id=project_id, + region=region, server_id=server_id, + update_server_payload=update_server_payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -30300,12 +37996,11 @@ def unrescue_server( ) _response_types_map: Dict[str, Optional[str]] = { - "202": None, + "200": "Server", "400": "Error", "401": "Error", "403": "Error", "404": "Error", - "409": "Error", "500": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -30316,16 +38011,18 @@ def unrescue_server( ).data @validate_call - def unrescue_server_with_http_info( + def update_server_with_http_info( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], server_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Server."), ], + update_server_payload: Annotated[UpdateServerPayload, Field(description="Request an update of a server.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -30335,15 +38032,19 @@ def unrescue_server_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[None]: - """Unrescue an existing server. + ) -> ApiResponse[Server]: + """Update information of a server. - Unrescue an existing server. The original boot volume is attached as boot volume of the server and the server is booted up. + Update name or labels of the server. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str :param server_id: The identifier (ID) of a STACKIT Server. (required) :type server_id: str + :param update_server_payload: Request an update of a server. (required) + :type update_server_payload: UpdateServerPayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -30366,9 +38067,11 @@ def unrescue_server_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._unrescue_server_serialize( + _param = self._update_server_serialize( project_id=project_id, + region=region, server_id=server_id, + update_server_payload=update_server_payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -30376,12 +38079,11 @@ def unrescue_server_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "202": None, + "200": "Server", "400": "Error", "401": "Error", "403": "Error", "404": "Error", - "409": "Error", "500": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -30392,16 +38094,18 @@ def unrescue_server_with_http_info( ) @validate_call - def unrescue_server_without_preload_content( + def update_server_without_preload_content( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], server_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Server."), ], + update_server_payload: Annotated[UpdateServerPayload, Field(description="Request an update of a server.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -30412,14 +38116,18 @@ def unrescue_server_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Unrescue an existing server. + """Update information of a server. - Unrescue an existing server. The original boot volume is attached as boot volume of the server and the server is booted up. + Update name or labels of the server. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str :param server_id: The identifier (ID) of a STACKIT Server. (required) :type server_id: str + :param update_server_payload: Request an update of a server. (required) + :type update_server_payload: UpdateServerPayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -30442,9 +38150,11 @@ def unrescue_server_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._unrescue_server_serialize( + _param = self._update_server_serialize( project_id=project_id, + region=region, server_id=server_id, + update_server_payload=update_server_payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -30452,21 +38162,22 @@ def unrescue_server_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "202": None, + "200": "Server", "400": "Error", "401": "Error", "403": "Error", "404": "Error", - "409": "Error", "500": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _unrescue_server_serialize( + def _update_server_serialize( self, project_id, + region, server_id, + update_server_payload, _request_auth, _content_type, _headers, @@ -30487,23 +38198,35 @@ def _unrescue_server_serialize( # process the path parameters if project_id is not None: _path_params["projectId"] = project_id + if region is not None: + _path_params["region"] = region if server_id is not None: _path_params["serverId"] = server_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + if update_server_payload is not None: + _body_params = update_server_payload # set the HTTP header `Accept` if "Accept" not in _header_params: _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) + # set the HTTP header `Content-Type` + if _content_type: + _header_params["Content-Type"] = _content_type + else: + _default_content_type = self.api_client.select_header_content_type(["application/json"]) + if _default_content_type is not None: + _header_params["Content-Type"] = _default_content_type + # authentication setting _auth_settings: List[str] = [] return self.api_client.param_serialize( - method="POST", - resource_path="/v1/projects/{projectId}/servers/{serverId}/unrescue", + method="PATCH", + resource_path="/v2beta1/projects/{projectId}/regions/{region}/servers/{serverId}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -30517,23 +38240,18 @@ def _unrescue_server_serialize( ) @validate_call - def update_attached_volume( + def update_volume( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - server_id: Annotated[ - str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Server."), - ], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], volume_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Volume."), ], - update_attached_volume_payload: Annotated[ - UpdateAttachedVolumePayload, Field(description="Request a volume attachment update.") - ], + update_volume_payload: Annotated[UpdateVolumePayload, Field(description="Request an update of a volume.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -30543,19 +38261,19 @@ def update_attached_volume( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> VolumeAttachment: - """Update Volume Attachment Parameters. + ) -> Volume: + """Update information of a volume. - Update the properties of an existing Volume Attachment. + Update name, description or labels of the volume. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str - :param server_id: The identifier (ID) of a STACKIT Server. (required) - :type server_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str :param volume_id: The identifier (ID) of a STACKIT Volume. (required) :type volume_id: str - :param update_attached_volume_payload: Request a volume attachment update. (required) - :type update_attached_volume_payload: UpdateAttachedVolumePayload + :param update_volume_payload: Request an update of a volume. (required) + :type update_volume_payload: UpdateVolumePayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -30578,11 +38296,11 @@ def update_attached_volume( :return: Returns the result object. """ # noqa: E501 - _param = self._update_attached_volume_serialize( + _param = self._update_volume_serialize( project_id=project_id, - server_id=server_id, + region=region, volume_id=volume_id, - update_attached_volume_payload=update_attached_volume_payload, + update_volume_payload=update_volume_payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -30590,7 +38308,7 @@ def update_attached_volume( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "VolumeAttachment", + "200": "Volume", "400": "Error", "401": "Error", "403": "Error", @@ -30605,23 +38323,18 @@ def update_attached_volume( ).data @validate_call - def update_attached_volume_with_http_info( + def update_volume_with_http_info( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - server_id: Annotated[ - str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Server."), - ], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], volume_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Volume."), ], - update_attached_volume_payload: Annotated[ - UpdateAttachedVolumePayload, Field(description="Request a volume attachment update.") - ], + update_volume_payload: Annotated[UpdateVolumePayload, Field(description="Request an update of a volume.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -30631,19 +38344,19 @@ def update_attached_volume_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[VolumeAttachment]: - """Update Volume Attachment Parameters. + ) -> ApiResponse[Volume]: + """Update information of a volume. - Update the properties of an existing Volume Attachment. + Update name, description or labels of the volume. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str - :param server_id: The identifier (ID) of a STACKIT Server. (required) - :type server_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str :param volume_id: The identifier (ID) of a STACKIT Volume. (required) :type volume_id: str - :param update_attached_volume_payload: Request a volume attachment update. (required) - :type update_attached_volume_payload: UpdateAttachedVolumePayload + :param update_volume_payload: Request an update of a volume. (required) + :type update_volume_payload: UpdateVolumePayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -30666,11 +38379,11 @@ def update_attached_volume_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._update_attached_volume_serialize( + _param = self._update_volume_serialize( project_id=project_id, - server_id=server_id, + region=region, volume_id=volume_id, - update_attached_volume_payload=update_attached_volume_payload, + update_volume_payload=update_volume_payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -30678,7 +38391,7 @@ def update_attached_volume_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "VolumeAttachment", + "200": "Volume", "400": "Error", "401": "Error", "403": "Error", @@ -30693,23 +38406,18 @@ def update_attached_volume_with_http_info( ) @validate_call - def update_attached_volume_without_preload_content( + def update_volume_without_preload_content( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - server_id: Annotated[ - str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Server."), - ], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], volume_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Volume."), ], - update_attached_volume_payload: Annotated[ - UpdateAttachedVolumePayload, Field(description="Request a volume attachment update.") - ], + update_volume_payload: Annotated[UpdateVolumePayload, Field(description="Request an update of a volume.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -30720,18 +38428,18 @@ def update_attached_volume_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Update Volume Attachment Parameters. + """Update information of a volume. - Update the properties of an existing Volume Attachment. + Update name, description or labels of the volume. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str - :param server_id: The identifier (ID) of a STACKIT Server. (required) - :type server_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str :param volume_id: The identifier (ID) of a STACKIT Volume. (required) :type volume_id: str - :param update_attached_volume_payload: Request a volume attachment update. (required) - :type update_attached_volume_payload: UpdateAttachedVolumePayload + :param update_volume_payload: Request an update of a volume. (required) + :type update_volume_payload: UpdateVolumePayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -30754,11 +38462,11 @@ def update_attached_volume_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._update_attached_volume_serialize( + _param = self._update_volume_serialize( project_id=project_id, - server_id=server_id, + region=region, volume_id=volume_id, - update_attached_volume_payload=update_attached_volume_payload, + update_volume_payload=update_volume_payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -30766,7 +38474,7 @@ def update_attached_volume_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "VolumeAttachment", + "200": "Volume", "400": "Error", "401": "Error", "403": "Error", @@ -30776,12 +38484,12 @@ def update_attached_volume_without_preload_content( response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _update_attached_volume_serialize( + def _update_volume_serialize( self, project_id, - server_id, + region, volume_id, - update_attached_volume_payload, + update_volume_payload, _request_auth, _content_type, _headers, @@ -30802,16 +38510,16 @@ def _update_attached_volume_serialize( # process the path parameters if project_id is not None: _path_params["projectId"] = project_id - if server_id is not None: - _path_params["serverId"] = server_id + if region is not None: + _path_params["region"] = region if volume_id is not None: _path_params["volumeId"] = volume_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - if update_attached_volume_payload is not None: - _body_params = update_attached_volume_payload + if update_volume_payload is not None: + _body_params = update_volume_payload # set the HTTP header `Accept` if "Accept" not in _header_params: @@ -30830,7 +38538,7 @@ def _update_attached_volume_serialize( return self.api_client.param_serialize( method="PATCH", - resource_path="/v1/projects/{projectId}/servers/{serverId}/volume-attachments/{volumeId}", + resource_path="/v2beta1/projects/{projectId}/regions/{region}/volumes/{volumeId}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -30844,17 +38552,25 @@ def _update_attached_volume_serialize( ) @validate_call - def update_backup( + def v2beta1_configure_network_area_region( self, - project_id: Annotated[ + organization_id: Annotated[ str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), + Field( + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Organization." + ), ], - backup_id: Annotated[ + area_id: Annotated[ str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Backup."), + Field( + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Network Area." + ), + ], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + v2beta1_configure_network_area_region_payload: Annotated[ + V2beta1ConfigureNetworkAreaRegionPayload, + Field(description="Request to add a new regional network area configuration."), ], - update_backup_payload: Annotated[UpdateBackupPayload, Field(description="Request an update of a backup.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -30864,17 +38580,19 @@ def update_backup( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> Backup: - """Update information of a backup. + ) -> RegionalArea: + """Configure a region for a network area. - Update name or labels of the backup. + Configure a new region for a network area. - :param project_id: The identifier (ID) of a STACKIT Project. (required) - :type project_id: str - :param backup_id: The identifier (ID) of a STACKIT Backup. (required) - :type backup_id: str - :param update_backup_payload: Request an update of a backup. (required) - :type update_backup_payload: UpdateBackupPayload + :param organization_id: The identifier (ID) of a STACKIT Organization. (required) + :type organization_id: str + :param area_id: The identifier (ID) of a STACKIT Network Area. (required) + :type area_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param v2beta1_configure_network_area_region_payload: Request to add a new regional network area configuration. (required) + :type v2beta1_configure_network_area_region_payload: V2beta1ConfigureNetworkAreaRegionPayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -30897,10 +38615,11 @@ def update_backup( :return: Returns the result object. """ # noqa: E501 - _param = self._update_backup_serialize( - project_id=project_id, - backup_id=backup_id, - update_backup_payload=update_backup_payload, + _param = self._v2beta1_configure_network_area_region_serialize( + organization_id=organization_id, + area_id=area_id, + region=region, + v2beta1_configure_network_area_region_payload=v2beta1_configure_network_area_region_payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -30908,11 +38627,12 @@ def update_backup( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Backup", + "202": "RegionalArea", "400": "Error", "401": "Error", "403": "Error", "404": "Error", + "409": "Error", "500": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -30923,17 +38643,25 @@ def update_backup( ).data @validate_call - def update_backup_with_http_info( + def v2beta1_configure_network_area_region_with_http_info( self, - project_id: Annotated[ + organization_id: Annotated[ str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), + Field( + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Organization." + ), ], - backup_id: Annotated[ + area_id: Annotated[ str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Backup."), + Field( + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Network Area." + ), + ], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + v2beta1_configure_network_area_region_payload: Annotated[ + V2beta1ConfigureNetworkAreaRegionPayload, + Field(description="Request to add a new regional network area configuration."), ], - update_backup_payload: Annotated[UpdateBackupPayload, Field(description="Request an update of a backup.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -30943,17 +38671,19 @@ def update_backup_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[Backup]: - """Update information of a backup. + ) -> ApiResponse[RegionalArea]: + """Configure a region for a network area. - Update name or labels of the backup. + Configure a new region for a network area. - :param project_id: The identifier (ID) of a STACKIT Project. (required) - :type project_id: str - :param backup_id: The identifier (ID) of a STACKIT Backup. (required) - :type backup_id: str - :param update_backup_payload: Request an update of a backup. (required) - :type update_backup_payload: UpdateBackupPayload + :param organization_id: The identifier (ID) of a STACKIT Organization. (required) + :type organization_id: str + :param area_id: The identifier (ID) of a STACKIT Network Area. (required) + :type area_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param v2beta1_configure_network_area_region_payload: Request to add a new regional network area configuration. (required) + :type v2beta1_configure_network_area_region_payload: V2beta1ConfigureNetworkAreaRegionPayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -30976,10 +38706,11 @@ def update_backup_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._update_backup_serialize( - project_id=project_id, - backup_id=backup_id, - update_backup_payload=update_backup_payload, + _param = self._v2beta1_configure_network_area_region_serialize( + organization_id=organization_id, + area_id=area_id, + region=region, + v2beta1_configure_network_area_region_payload=v2beta1_configure_network_area_region_payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -30987,11 +38718,12 @@ def update_backup_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Backup", + "202": "RegionalArea", "400": "Error", "401": "Error", "403": "Error", "404": "Error", + "409": "Error", "500": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -31002,17 +38734,25 @@ def update_backup_with_http_info( ) @validate_call - def update_backup_without_preload_content( + def v2beta1_configure_network_area_region_without_preload_content( self, - project_id: Annotated[ + organization_id: Annotated[ str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), + Field( + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Organization." + ), ], - backup_id: Annotated[ + area_id: Annotated[ str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Backup."), + Field( + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Network Area." + ), + ], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + v2beta1_configure_network_area_region_payload: Annotated[ + V2beta1ConfigureNetworkAreaRegionPayload, + Field(description="Request to add a new regional network area configuration."), ], - update_backup_payload: Annotated[UpdateBackupPayload, Field(description="Request an update of a backup.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -31023,16 +38763,18 @@ def update_backup_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Update information of a backup. + """Configure a region for a network area. - Update name or labels of the backup. + Configure a new region for a network area. - :param project_id: The identifier (ID) of a STACKIT Project. (required) - :type project_id: str - :param backup_id: The identifier (ID) of a STACKIT Backup. (required) - :type backup_id: str - :param update_backup_payload: Request an update of a backup. (required) - :type update_backup_payload: UpdateBackupPayload + :param organization_id: The identifier (ID) of a STACKIT Organization. (required) + :type organization_id: str + :param area_id: The identifier (ID) of a STACKIT Network Area. (required) + :type area_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param v2beta1_configure_network_area_region_payload: Request to add a new regional network area configuration. (required) + :type v2beta1_configure_network_area_region_payload: V2beta1ConfigureNetworkAreaRegionPayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -31055,10 +38797,11 @@ def update_backup_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._update_backup_serialize( - project_id=project_id, - backup_id=backup_id, - update_backup_payload=update_backup_payload, + _param = self._v2beta1_configure_network_area_region_serialize( + organization_id=organization_id, + area_id=area_id, + region=region, + v2beta1_configure_network_area_region_payload=v2beta1_configure_network_area_region_payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -31066,21 +38809,23 @@ def update_backup_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Backup", + "202": "RegionalArea", "400": "Error", "401": "Error", "403": "Error", "404": "Error", + "409": "Error", "500": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _update_backup_serialize( + def _v2beta1_configure_network_area_region_serialize( self, - project_id, - backup_id, - update_backup_payload, + organization_id, + area_id, + region, + v2beta1_configure_network_area_region_payload, _request_auth, _content_type, _headers, @@ -31099,16 +38844,18 @@ def _update_backup_serialize( _body_params: Optional[bytes] = None # process the path parameters - if project_id is not None: - _path_params["projectId"] = project_id - if backup_id is not None: - _path_params["backupId"] = backup_id + if organization_id is not None: + _path_params["organizationId"] = organization_id + if area_id is not None: + _path_params["areaId"] = area_id + if region is not None: + _path_params["region"] = region # process the query parameters # process the header parameters # process the form parameters # process the body parameter - if update_backup_payload is not None: - _body_params = update_backup_payload + if v2beta1_configure_network_area_region_payload is not None: + _body_params = v2beta1_configure_network_area_region_payload # set the HTTP header `Accept` if "Accept" not in _header_params: @@ -31126,8 +38873,8 @@ def _update_backup_serialize( _auth_settings: List[str] = [] return self.api_client.param_serialize( - method="PATCH", - resource_path="/v1/projects/{projectId}/backups/{backupId}", + method="PUT", + resource_path="/v2beta1/organizations/{organizationId}/network-areas/{areaId}/regions/{region}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -31141,16 +38888,16 @@ def _update_backup_serialize( ) @validate_call - def update_image( + def v2beta1_create_snapshot( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - image_id: Annotated[ - str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Image.") + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + v2beta1_create_snapshot_payload: Annotated[ + V2beta1CreateSnapshotPayload, Field(description="Request a snapshot creation.") ], - update_image_payload: Annotated[UpdateImagePayload, Field(description="Request an update of an Image.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -31160,17 +38907,17 @@ def update_image( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> Image: - """Update Image Parameters. + ) -> Snapshot: + """Create new Snapshot. - Update the properties of an existing Image inside a project. + Create a new Snapshot from a Volume in a project. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str - :param image_id: The identifier (ID) of a STACKIT Image. (required) - :type image_id: str - :param update_image_payload: Request an update of an Image. (required) - :type update_image_payload: UpdateImagePayload + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param v2beta1_create_snapshot_payload: Request a snapshot creation. (required) + :type v2beta1_create_snapshot_payload: V2beta1CreateSnapshotPayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -31193,10 +38940,10 @@ def update_image( :return: Returns the result object. """ # noqa: E501 - _param = self._update_image_serialize( + _param = self._v2beta1_create_snapshot_serialize( project_id=project_id, - image_id=image_id, - update_image_payload=update_image_payload, + region=region, + v2beta1_create_snapshot_payload=v2beta1_create_snapshot_payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -31204,7 +38951,7 @@ def update_image( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Image", + "201": "Snapshot", "400": "Error", "401": "Error", "403": "Error", @@ -31219,16 +38966,16 @@ def update_image( ).data @validate_call - def update_image_with_http_info( + def v2beta1_create_snapshot_with_http_info( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - image_id: Annotated[ - str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Image.") + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + v2beta1_create_snapshot_payload: Annotated[ + V2beta1CreateSnapshotPayload, Field(description="Request a snapshot creation.") ], - update_image_payload: Annotated[UpdateImagePayload, Field(description="Request an update of an Image.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -31238,17 +38985,17 @@ def update_image_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[Image]: - """Update Image Parameters. + ) -> ApiResponse[Snapshot]: + """Create new Snapshot. - Update the properties of an existing Image inside a project. + Create a new Snapshot from a Volume in a project. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str - :param image_id: The identifier (ID) of a STACKIT Image. (required) - :type image_id: str - :param update_image_payload: Request an update of an Image. (required) - :type update_image_payload: UpdateImagePayload + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param v2beta1_create_snapshot_payload: Request a snapshot creation. (required) + :type v2beta1_create_snapshot_payload: V2beta1CreateSnapshotPayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -31271,10 +39018,10 @@ def update_image_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._update_image_serialize( + _param = self._v2beta1_create_snapshot_serialize( project_id=project_id, - image_id=image_id, - update_image_payload=update_image_payload, + region=region, + v2beta1_create_snapshot_payload=v2beta1_create_snapshot_payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -31282,7 +39029,7 @@ def update_image_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Image", + "201": "Snapshot", "400": "Error", "401": "Error", "403": "Error", @@ -31297,16 +39044,16 @@ def update_image_with_http_info( ) @validate_call - def update_image_without_preload_content( + def v2beta1_create_snapshot_without_preload_content( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - image_id: Annotated[ - str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Image.") + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + v2beta1_create_snapshot_payload: Annotated[ + V2beta1CreateSnapshotPayload, Field(description="Request a snapshot creation.") ], - update_image_payload: Annotated[UpdateImagePayload, Field(description="Request an update of an Image.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -31317,16 +39064,16 @@ def update_image_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Update Image Parameters. + """Create new Snapshot. - Update the properties of an existing Image inside a project. + Create a new Snapshot from a Volume in a project. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str - :param image_id: The identifier (ID) of a STACKIT Image. (required) - :type image_id: str - :param update_image_payload: Request an update of an Image. (required) - :type update_image_payload: UpdateImagePayload + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param v2beta1_create_snapshot_payload: Request a snapshot creation. (required) + :type v2beta1_create_snapshot_payload: V2beta1CreateSnapshotPayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -31349,10 +39096,10 @@ def update_image_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._update_image_serialize( + _param = self._v2beta1_create_snapshot_serialize( project_id=project_id, - image_id=image_id, - update_image_payload=update_image_payload, + region=region, + v2beta1_create_snapshot_payload=v2beta1_create_snapshot_payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -31360,7 +39107,7 @@ def update_image_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Image", + "201": "Snapshot", "400": "Error", "401": "Error", "403": "Error", @@ -31370,11 +39117,11 @@ def update_image_without_preload_content( response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _update_image_serialize( + def _v2beta1_create_snapshot_serialize( self, project_id, - image_id, - update_image_payload, + region, + v2beta1_create_snapshot_payload, _request_auth, _content_type, _headers, @@ -31395,14 +39142,14 @@ def _update_image_serialize( # process the path parameters if project_id is not None: _path_params["projectId"] = project_id - if image_id is not None: - _path_params["imageId"] = image_id + if region is not None: + _path_params["region"] = region # process the query parameters # process the header parameters # process the form parameters # process the body parameter - if update_image_payload is not None: - _body_params = update_image_payload + if v2beta1_create_snapshot_payload is not None: + _body_params = v2beta1_create_snapshot_payload # set the HTTP header `Accept` if "Accept" not in _header_params: @@ -31420,8 +39167,8 @@ def _update_image_serialize( _auth_settings: List[str] = [] return self.api_client.param_serialize( - method="PATCH", - resource_path="/v1/projects/{projectId}/images/{imageId}", + method="POST", + resource_path="/v2beta1/projects/{projectId}/regions/{region}/snapshots", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -31435,15 +39182,21 @@ def _update_image_serialize( ) @validate_call - def update_image_scope_local( + def v2beta1_delete_network_area_region( self, - project_id: Annotated[ + organization_id: Annotated[ str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), + Field( + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Organization." + ), ], - image_id: Annotated[ - str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Image.") + area_id: Annotated[ + str, + Field( + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Network Area." + ), ], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -31453,15 +39206,17 @@ def update_image_scope_local( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> Image: - """Update Image Scope to Local. + ) -> None: + """Delete a configuration of region for a network area. - Update the scope property of an existing Image inside a project to local. + Delete a current configuration of region for a network area. - :param project_id: The identifier (ID) of a STACKIT Project. (required) - :type project_id: str - :param image_id: The identifier (ID) of a STACKIT Image. (required) - :type image_id: str + :param organization_id: The identifier (ID) of a STACKIT Organization. (required) + :type organization_id: str + :param area_id: The identifier (ID) of a STACKIT Network Area. (required) + :type area_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -31484,9 +39239,10 @@ def update_image_scope_local( :return: Returns the result object. """ # noqa: E501 - _param = self._update_image_scope_local_serialize( - project_id=project_id, - image_id=image_id, + _param = self._v2beta1_delete_network_area_region_serialize( + organization_id=organization_id, + area_id=area_id, + region=region, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -31494,11 +39250,12 @@ def update_image_scope_local( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Image", + "202": None, "400": "Error", "401": "Error", "403": "Error", "404": "Error", + "409": "Error", "500": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -31509,15 +39266,21 @@ def update_image_scope_local( ).data @validate_call - def update_image_scope_local_with_http_info( + def v2beta1_delete_network_area_region_with_http_info( self, - project_id: Annotated[ + organization_id: Annotated[ str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), + Field( + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Organization." + ), ], - image_id: Annotated[ - str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Image.") + area_id: Annotated[ + str, + Field( + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Network Area." + ), ], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -31527,15 +39290,17 @@ def update_image_scope_local_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[Image]: - """Update Image Scope to Local. + ) -> ApiResponse[None]: + """Delete a configuration of region for a network area. - Update the scope property of an existing Image inside a project to local. + Delete a current configuration of region for a network area. - :param project_id: The identifier (ID) of a STACKIT Project. (required) - :type project_id: str - :param image_id: The identifier (ID) of a STACKIT Image. (required) - :type image_id: str + :param organization_id: The identifier (ID) of a STACKIT Organization. (required) + :type organization_id: str + :param area_id: The identifier (ID) of a STACKIT Network Area. (required) + :type area_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -31558,9 +39323,10 @@ def update_image_scope_local_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._update_image_scope_local_serialize( - project_id=project_id, - image_id=image_id, + _param = self._v2beta1_delete_network_area_region_serialize( + organization_id=organization_id, + area_id=area_id, + region=region, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -31568,11 +39334,12 @@ def update_image_scope_local_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Image", + "202": None, "400": "Error", "401": "Error", "403": "Error", "404": "Error", + "409": "Error", "500": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -31583,15 +39350,21 @@ def update_image_scope_local_with_http_info( ) @validate_call - def update_image_scope_local_without_preload_content( + def v2beta1_delete_network_area_region_without_preload_content( self, - project_id: Annotated[ + organization_id: Annotated[ str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), + Field( + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Organization." + ), ], - image_id: Annotated[ - str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Image.") + area_id: Annotated[ + str, + Field( + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Network Area." + ), ], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -31602,14 +39375,16 @@ def update_image_scope_local_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Update Image Scope to Local. + """Delete a configuration of region for a network area. - Update the scope property of an existing Image inside a project to local. + Delete a current configuration of region for a network area. - :param project_id: The identifier (ID) of a STACKIT Project. (required) - :type project_id: str - :param image_id: The identifier (ID) of a STACKIT Image. (required) - :type image_id: str + :param organization_id: The identifier (ID) of a STACKIT Organization. (required) + :type organization_id: str + :param area_id: The identifier (ID) of a STACKIT Network Area. (required) + :type area_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -31632,9 +39407,10 @@ def update_image_scope_local_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._update_image_scope_local_serialize( - project_id=project_id, - image_id=image_id, + _param = self._v2beta1_delete_network_area_region_serialize( + organization_id=organization_id, + area_id=area_id, + region=region, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -31642,20 +39418,22 @@ def update_image_scope_local_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Image", + "202": None, "400": "Error", "401": "Error", "403": "Error", "404": "Error", + "409": "Error", "500": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _update_image_scope_local_serialize( + def _v2beta1_delete_network_area_region_serialize( self, - project_id, - image_id, + organization_id, + area_id, + region, _request_auth, _content_type, _headers, @@ -31674,10 +39452,12 @@ def _update_image_scope_local_serialize( _body_params: Optional[bytes] = None # process the path parameters - if project_id is not None: - _path_params["projectId"] = project_id - if image_id is not None: - _path_params["imageId"] = image_id + if organization_id is not None: + _path_params["organizationId"] = organization_id + if area_id is not None: + _path_params["areaId"] = area_id + if region is not None: + _path_params["region"] = region # process the query parameters # process the header parameters # process the form parameters @@ -31692,7 +39472,7 @@ def _update_image_scope_local_serialize( return self.api_client.param_serialize( method="DELETE", - resource_path="/v1/projects/{projectId}/images/{imageId}/publish", + resource_path="/v2beta1/organizations/{organizationId}/network-areas/{areaId}/regions/{region}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -31706,14 +39486,16 @@ def _update_image_scope_local_serialize( ) @validate_call - def update_image_scope_public( + def v2beta1_delete_snapshot( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - image_id: Annotated[ - str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Image.") + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + snapshot_id: Annotated[ + str, + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Snapshot."), ], _request_timeout: Union[ None, @@ -31724,15 +39506,17 @@ def update_image_scope_public( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> Image: - """Update Image Scope to Public. + ) -> None: + """Delete a snapshot. - Update the scope property of an existing Image inside a project to public. + Delete a snapshot that is part of the project. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str - :param image_id: The identifier (ID) of a STACKIT Image. (required) - :type image_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param snapshot_id: The identifier (ID) of a STACKIT Snapshot. (required) + :type snapshot_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -31755,9 +39539,10 @@ def update_image_scope_public( :return: Returns the result object. """ # noqa: E501 - _param = self._update_image_scope_public_serialize( + _param = self._v2beta1_delete_snapshot_serialize( project_id=project_id, - image_id=image_id, + region=region, + snapshot_id=snapshot_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -31765,7 +39550,7 @@ def update_image_scope_public( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Image", + "204": None, "400": "Error", "401": "Error", "403": "Error", @@ -31780,14 +39565,16 @@ def update_image_scope_public( ).data @validate_call - def update_image_scope_public_with_http_info( + def v2beta1_delete_snapshot_with_http_info( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - image_id: Annotated[ - str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Image.") + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + snapshot_id: Annotated[ + str, + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Snapshot."), ], _request_timeout: Union[ None, @@ -31798,15 +39585,17 @@ def update_image_scope_public_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[Image]: - """Update Image Scope to Public. + ) -> ApiResponse[None]: + """Delete a snapshot. - Update the scope property of an existing Image inside a project to public. + Delete a snapshot that is part of the project. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str - :param image_id: The identifier (ID) of a STACKIT Image. (required) - :type image_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param snapshot_id: The identifier (ID) of a STACKIT Snapshot. (required) + :type snapshot_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -31829,9 +39618,10 @@ def update_image_scope_public_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._update_image_scope_public_serialize( + _param = self._v2beta1_delete_snapshot_serialize( project_id=project_id, - image_id=image_id, + region=region, + snapshot_id=snapshot_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -31839,7 +39629,7 @@ def update_image_scope_public_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Image", + "204": None, "400": "Error", "401": "Error", "403": "Error", @@ -31854,14 +39644,16 @@ def update_image_scope_public_with_http_info( ) @validate_call - def update_image_scope_public_without_preload_content( + def v2beta1_delete_snapshot_without_preload_content( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - image_id: Annotated[ - str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Image.") + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + snapshot_id: Annotated[ + str, + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Snapshot."), ], _request_timeout: Union[ None, @@ -31873,14 +39665,16 @@ def update_image_scope_public_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Update Image Scope to Public. + """Delete a snapshot. - Update the scope property of an existing Image inside a project to public. + Delete a snapshot that is part of the project. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str - :param image_id: The identifier (ID) of a STACKIT Image. (required) - :type image_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param snapshot_id: The identifier (ID) of a STACKIT Snapshot. (required) + :type snapshot_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -31903,9 +39697,10 @@ def update_image_scope_public_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._update_image_scope_public_serialize( + _param = self._v2beta1_delete_snapshot_serialize( project_id=project_id, - image_id=image_id, + region=region, + snapshot_id=snapshot_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -31913,7 +39708,7 @@ def update_image_scope_public_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Image", + "204": None, "400": "Error", "401": "Error", "403": "Error", @@ -31923,10 +39718,11 @@ def update_image_scope_public_without_preload_content( response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _update_image_scope_public_serialize( + def _v2beta1_delete_snapshot_serialize( self, project_id, - image_id, + region, + snapshot_id, _request_auth, _content_type, _headers, @@ -31947,8 +39743,10 @@ def _update_image_scope_public_serialize( # process the path parameters if project_id is not None: _path_params["projectId"] = project_id - if image_id is not None: - _path_params["imageId"] = image_id + if region is not None: + _path_params["region"] = region + if snapshot_id is not None: + _path_params["snapshotId"] = snapshot_id # process the query parameters # process the header parameters # process the form parameters @@ -31962,8 +39760,8 @@ def _update_image_scope_public_serialize( _auth_settings: List[str] = [] return self.api_client.param_serialize( - method="PUT", - resource_path="/v1/projects/{projectId}/images/{imageId}/publish", + method="DELETE", + resource_path="/v2beta1/projects/{projectId}/regions/{region}/snapshots/{snapshotId}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -31977,16 +39775,21 @@ def _update_image_scope_public_serialize( ) @validate_call - def update_image_share( + def v2beta1_get_area_region( self, - project_id: Annotated[ + organization_id: Annotated[ str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), + Field( + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Organization." + ), ], - image_id: Annotated[ - str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Image.") + area_id: Annotated[ + str, + Field( + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Network Area." + ), ], - update_image_share_payload: Annotated[UpdateImageSharePayload, Field(description="Update an Image Share.")], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -31996,17 +39799,17 @@ def update_image_share( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ImageShare: - """Update image share. + ) -> RegionalArea: + """Get details about a configured region. - Update share of an Image. Projects will be appended to existing list. + Get details about a configured region in a network area. - :param project_id: The identifier (ID) of a STACKIT Project. (required) - :type project_id: str - :param image_id: The identifier (ID) of a STACKIT Image. (required) - :type image_id: str - :param update_image_share_payload: Update an Image Share. (required) - :type update_image_share_payload: UpdateImageSharePayload + :param organization_id: The identifier (ID) of a STACKIT Organization. (required) + :type organization_id: str + :param area_id: The identifier (ID) of a STACKIT Network Area. (required) + :type area_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -32029,10 +39832,10 @@ def update_image_share( :return: Returns the result object. """ # noqa: E501 - _param = self._update_image_share_serialize( - project_id=project_id, - image_id=image_id, - update_image_share_payload=update_image_share_payload, + _param = self._v2beta1_get_area_region_serialize( + organization_id=organization_id, + area_id=area_id, + region=region, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -32040,7 +39843,7 @@ def update_image_share( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ImageShare", + "200": "RegionalArea", "400": "Error", "401": "Error", "403": "Error", @@ -32055,16 +39858,21 @@ def update_image_share( ).data @validate_call - def update_image_share_with_http_info( + def v2beta1_get_area_region_with_http_info( self, - project_id: Annotated[ + organization_id: Annotated[ str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), + Field( + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Organization." + ), ], - image_id: Annotated[ - str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Image.") + area_id: Annotated[ + str, + Field( + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Network Area." + ), ], - update_image_share_payload: Annotated[UpdateImageSharePayload, Field(description="Update an Image Share.")], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -32074,17 +39882,17 @@ def update_image_share_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[ImageShare]: - """Update image share. + ) -> ApiResponse[RegionalArea]: + """Get details about a configured region. - Update share of an Image. Projects will be appended to existing list. + Get details about a configured region in a network area. - :param project_id: The identifier (ID) of a STACKIT Project. (required) - :type project_id: str - :param image_id: The identifier (ID) of a STACKIT Image. (required) - :type image_id: str - :param update_image_share_payload: Update an Image Share. (required) - :type update_image_share_payload: UpdateImageSharePayload + :param organization_id: The identifier (ID) of a STACKIT Organization. (required) + :type organization_id: str + :param area_id: The identifier (ID) of a STACKIT Network Area. (required) + :type area_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -32107,10 +39915,10 @@ def update_image_share_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._update_image_share_serialize( - project_id=project_id, - image_id=image_id, - update_image_share_payload=update_image_share_payload, + _param = self._v2beta1_get_area_region_serialize( + organization_id=organization_id, + area_id=area_id, + region=region, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -32118,7 +39926,7 @@ def update_image_share_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ImageShare", + "200": "RegionalArea", "400": "Error", "401": "Error", "403": "Error", @@ -32133,16 +39941,21 @@ def update_image_share_with_http_info( ) @validate_call - def update_image_share_without_preload_content( + def v2beta1_get_area_region_without_preload_content( self, - project_id: Annotated[ + organization_id: Annotated[ str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), + Field( + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Organization." + ), ], - image_id: Annotated[ - str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Image.") + area_id: Annotated[ + str, + Field( + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Network Area." + ), ], - update_image_share_payload: Annotated[UpdateImageSharePayload, Field(description="Update an Image Share.")], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -32153,16 +39966,16 @@ def update_image_share_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Update image share. + """Get details about a configured region. - Update share of an Image. Projects will be appended to existing list. + Get details about a configured region in a network area. - :param project_id: The identifier (ID) of a STACKIT Project. (required) - :type project_id: str - :param image_id: The identifier (ID) of a STACKIT Image. (required) - :type image_id: str - :param update_image_share_payload: Update an Image Share. (required) - :type update_image_share_payload: UpdateImageSharePayload + :param organization_id: The identifier (ID) of a STACKIT Organization. (required) + :type organization_id: str + :param area_id: The identifier (ID) of a STACKIT Network Area. (required) + :type area_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -32185,10 +39998,10 @@ def update_image_share_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._update_image_share_serialize( - project_id=project_id, - image_id=image_id, - update_image_share_payload=update_image_share_payload, + _param = self._v2beta1_get_area_region_serialize( + organization_id=organization_id, + area_id=area_id, + region=region, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -32196,7 +40009,7 @@ def update_image_share_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ImageShare", + "200": "RegionalArea", "400": "Error", "401": "Error", "403": "Error", @@ -32206,11 +40019,11 @@ def update_image_share_without_preload_content( response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _update_image_share_serialize( + def _v2beta1_get_area_region_serialize( self, - project_id, - image_id, - update_image_share_payload, + organization_id, + area_id, + region, _request_auth, _content_type, _headers, @@ -32229,35 +40042,27 @@ def _update_image_share_serialize( _body_params: Optional[bytes] = None # process the path parameters - if project_id is not None: - _path_params["projectId"] = project_id - if image_id is not None: - _path_params["imageId"] = image_id + if organization_id is not None: + _path_params["organizationId"] = organization_id + if area_id is not None: + _path_params["areaId"] = area_id + if region is not None: + _path_params["region"] = region # process the query parameters # process the header parameters # process the form parameters # process the body parameter - if update_image_share_payload is not None: - _body_params = update_image_share_payload # set the HTTP header `Accept` if "Accept" not in _header_params: _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) - # set the HTTP header `Content-Type` - if _content_type: - _header_params["Content-Type"] = _content_type - else: - _default_content_type = self.api_client.select_header_content_type(["application/json"]) - if _default_content_type is not None: - _header_params["Content-Type"] = _default_content_type - # authentication setting _auth_settings: List[str] = [] return self.api_client.param_serialize( - method="PATCH", - resource_path="/v1/projects/{projectId}/images/{imageId}/share", + method="GET", + resource_path="/v2beta1/organizations/{organizationId}/network-areas/{areaId}/regions/{region}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -32271,11 +40076,16 @@ def _update_image_share_serialize( ) @validate_call - def update_key_pair( + def v2beta1_get_snapshot( self, - keypair_name: Annotated[str, Field(strict=True, max_length=127, description="The name of an SSH keypair.")], - update_key_pair_payload: Annotated[ - UpdateKeyPairPayload, Field(description="Request an update of an SSH keypair.") + project_id: Annotated[ + str, + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), + ], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + snapshot_id: Annotated[ + str, + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Snapshot."), ], _request_timeout: Union[ None, @@ -32286,15 +40096,17 @@ def update_key_pair( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> Keypair: - """Update information of an SSH keypair. + ) -> Snapshot: + """Get details about a snapshot. - Update labels of the SSH keypair. + Get details about a block device snapshot. - :param keypair_name: The name of an SSH keypair. (required) - :type keypair_name: str - :param update_key_pair_payload: Request an update of an SSH keypair. (required) - :type update_key_pair_payload: UpdateKeyPairPayload + :param project_id: The identifier (ID) of a STACKIT Project. (required) + :type project_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param snapshot_id: The identifier (ID) of a STACKIT Snapshot. (required) + :type snapshot_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -32317,9 +40129,10 @@ def update_key_pair( :return: Returns the result object. """ # noqa: E501 - _param = self._update_key_pair_serialize( - keypair_name=keypair_name, - update_key_pair_payload=update_key_pair_payload, + _param = self._v2beta1_get_snapshot_serialize( + project_id=project_id, + region=region, + snapshot_id=snapshot_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -32327,7 +40140,7 @@ def update_key_pair( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Keypair", + "200": "Snapshot", "400": "Error", "401": "Error", "403": "Error", @@ -32342,11 +40155,16 @@ def update_key_pair( ).data @validate_call - def update_key_pair_with_http_info( + def v2beta1_get_snapshot_with_http_info( self, - keypair_name: Annotated[str, Field(strict=True, max_length=127, description="The name of an SSH keypair.")], - update_key_pair_payload: Annotated[ - UpdateKeyPairPayload, Field(description="Request an update of an SSH keypair.") + project_id: Annotated[ + str, + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), + ], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + snapshot_id: Annotated[ + str, + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Snapshot."), ], _request_timeout: Union[ None, @@ -32357,15 +40175,17 @@ def update_key_pair_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[Keypair]: - """Update information of an SSH keypair. + ) -> ApiResponse[Snapshot]: + """Get details about a snapshot. - Update labels of the SSH keypair. + Get details about a block device snapshot. - :param keypair_name: The name of an SSH keypair. (required) - :type keypair_name: str - :param update_key_pair_payload: Request an update of an SSH keypair. (required) - :type update_key_pair_payload: UpdateKeyPairPayload + :param project_id: The identifier (ID) of a STACKIT Project. (required) + :type project_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param snapshot_id: The identifier (ID) of a STACKIT Snapshot. (required) + :type snapshot_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -32388,9 +40208,10 @@ def update_key_pair_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._update_key_pair_serialize( - keypair_name=keypair_name, - update_key_pair_payload=update_key_pair_payload, + _param = self._v2beta1_get_snapshot_serialize( + project_id=project_id, + region=region, + snapshot_id=snapshot_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -32398,7 +40219,7 @@ def update_key_pair_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Keypair", + "200": "Snapshot", "400": "Error", "401": "Error", "403": "Error", @@ -32413,11 +40234,16 @@ def update_key_pair_with_http_info( ) @validate_call - def update_key_pair_without_preload_content( + def v2beta1_get_snapshot_without_preload_content( self, - keypair_name: Annotated[str, Field(strict=True, max_length=127, description="The name of an SSH keypair.")], - update_key_pair_payload: Annotated[ - UpdateKeyPairPayload, Field(description="Request an update of an SSH keypair.") + project_id: Annotated[ + str, + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), + ], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + snapshot_id: Annotated[ + str, + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Snapshot."), ], _request_timeout: Union[ None, @@ -32429,14 +40255,16 @@ def update_key_pair_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Update information of an SSH keypair. + """Get details about a snapshot. - Update labels of the SSH keypair. + Get details about a block device snapshot. - :param keypair_name: The name of an SSH keypair. (required) - :type keypair_name: str - :param update_key_pair_payload: Request an update of an SSH keypair. (required) - :type update_key_pair_payload: UpdateKeyPairPayload + :param project_id: The identifier (ID) of a STACKIT Project. (required) + :type project_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param snapshot_id: The identifier (ID) of a STACKIT Snapshot. (required) + :type snapshot_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -32459,9 +40287,10 @@ def update_key_pair_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._update_key_pair_serialize( - keypair_name=keypair_name, - update_key_pair_payload=update_key_pair_payload, + _param = self._v2beta1_get_snapshot_serialize( + project_id=project_id, + region=region, + snapshot_id=snapshot_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -32469,7 +40298,7 @@ def update_key_pair_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Keypair", + "200": "Snapshot", "400": "Error", "401": "Error", "403": "Error", @@ -32479,10 +40308,11 @@ def update_key_pair_without_preload_content( response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _update_key_pair_serialize( + def _v2beta1_get_snapshot_serialize( self, - keypair_name, - update_key_pair_payload, + project_id, + region, + snapshot_id, _request_auth, _content_type, _headers, @@ -32501,33 +40331,27 @@ def _update_key_pair_serialize( _body_params: Optional[bytes] = None # process the path parameters - if keypair_name is not None: - _path_params["keypairName"] = keypair_name + if project_id is not None: + _path_params["projectId"] = project_id + if region is not None: + _path_params["region"] = region + if snapshot_id is not None: + _path_params["snapshotId"] = snapshot_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - if update_key_pair_payload is not None: - _body_params = update_key_pair_payload # set the HTTP header `Accept` if "Accept" not in _header_params: _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) - # set the HTTP header `Content-Type` - if _content_type: - _header_params["Content-Type"] = _content_type - else: - _default_content_type = self.api_client.select_header_content_type(["application/json"]) - if _default_content_type is not None: - _header_params["Content-Type"] = _default_content_type - # authentication setting _auth_settings: List[str] = [] return self.api_client.param_serialize( - method="PATCH", - resource_path="/v1/keypairs/{keypairName}", + method="GET", + resource_path="/v2beta1/projects/{projectId}/regions/{region}/snapshots/{snapshotId}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -32541,7 +40365,7 @@ def _update_key_pair_serialize( ) @validate_call - def update_network_area_route( + def v2beta1_list_area_regions( self, organization_id: Annotated[ str, @@ -32555,12 +40379,6 @@ def update_network_area_route( min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Network Area." ), ], - route_id: Annotated[ - str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Route.") - ], - update_network_area_route_payload: Annotated[ - UpdateNetworkAreaRoutePayload, Field(description="Request an update of a network route.") - ], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -32570,19 +40388,15 @@ def update_network_area_route( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> Route: - """Update a network route. + ) -> RegionalAreaListResponse: + """List all configured regions in a network area. - Update a network route defined in a network area. + Get a list of all configured regions. :param organization_id: The identifier (ID) of a STACKIT Organization. (required) :type organization_id: str :param area_id: The identifier (ID) of a STACKIT Network Area. (required) :type area_id: str - :param route_id: The identifier (ID) of a STACKIT Route. (required) - :type route_id: str - :param update_network_area_route_payload: Request an update of a network route. (required) - :type update_network_area_route_payload: UpdateNetworkAreaRoutePayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -32605,11 +40419,9 @@ def update_network_area_route( :return: Returns the result object. """ # noqa: E501 - _param = self._update_network_area_route_serialize( + _param = self._v2beta1_list_area_regions_serialize( organization_id=organization_id, area_id=area_id, - route_id=route_id, - update_network_area_route_payload=update_network_area_route_payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -32617,7 +40429,7 @@ def update_network_area_route( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Route", + "200": "RegionalAreaListResponse", "400": "Error", "401": "Error", "403": "Error", @@ -32632,7 +40444,7 @@ def update_network_area_route( ).data @validate_call - def update_network_area_route_with_http_info( + def v2beta1_list_area_regions_with_http_info( self, organization_id: Annotated[ str, @@ -32646,12 +40458,6 @@ def update_network_area_route_with_http_info( min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Network Area." ), ], - route_id: Annotated[ - str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Route.") - ], - update_network_area_route_payload: Annotated[ - UpdateNetworkAreaRoutePayload, Field(description="Request an update of a network route.") - ], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -32661,19 +40467,15 @@ def update_network_area_route_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[Route]: - """Update a network route. + ) -> ApiResponse[RegionalAreaListResponse]: + """List all configured regions in a network area. - Update a network route defined in a network area. + Get a list of all configured regions. :param organization_id: The identifier (ID) of a STACKIT Organization. (required) :type organization_id: str :param area_id: The identifier (ID) of a STACKIT Network Area. (required) :type area_id: str - :param route_id: The identifier (ID) of a STACKIT Route. (required) - :type route_id: str - :param update_network_area_route_payload: Request an update of a network route. (required) - :type update_network_area_route_payload: UpdateNetworkAreaRoutePayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -32696,11 +40498,9 @@ def update_network_area_route_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._update_network_area_route_serialize( + _param = self._v2beta1_list_area_regions_serialize( organization_id=organization_id, area_id=area_id, - route_id=route_id, - update_network_area_route_payload=update_network_area_route_payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -32708,7 +40508,7 @@ def update_network_area_route_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Route", + "200": "RegionalAreaListResponse", "400": "Error", "401": "Error", "403": "Error", @@ -32723,7 +40523,7 @@ def update_network_area_route_with_http_info( ) @validate_call - def update_network_area_route_without_preload_content( + def v2beta1_list_area_regions_without_preload_content( self, organization_id: Annotated[ str, @@ -32737,12 +40537,6 @@ def update_network_area_route_without_preload_content( min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Network Area." ), ], - route_id: Annotated[ - str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Route.") - ], - update_network_area_route_payload: Annotated[ - UpdateNetworkAreaRoutePayload, Field(description="Request an update of a network route.") - ], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -32753,18 +40547,14 @@ def update_network_area_route_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Update a network route. + """List all configured regions in a network area. - Update a network route defined in a network area. + Get a list of all configured regions. :param organization_id: The identifier (ID) of a STACKIT Organization. (required) :type organization_id: str :param area_id: The identifier (ID) of a STACKIT Network Area. (required) :type area_id: str - :param route_id: The identifier (ID) of a STACKIT Route. (required) - :type route_id: str - :param update_network_area_route_payload: Request an update of a network route. (required) - :type update_network_area_route_payload: UpdateNetworkAreaRoutePayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -32787,11 +40577,9 @@ def update_network_area_route_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._update_network_area_route_serialize( + _param = self._v2beta1_list_area_regions_serialize( organization_id=organization_id, area_id=area_id, - route_id=route_id, - update_network_area_route_payload=update_network_area_route_payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -32799,7 +40587,7 @@ def update_network_area_route_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Route", + "200": "RegionalAreaListResponse", "400": "Error", "401": "Error", "403": "Error", @@ -32809,12 +40597,10 @@ def update_network_area_route_without_preload_content( response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _update_network_area_route_serialize( + def _v2beta1_list_area_regions_serialize( self, organization_id, area_id, - route_id, - update_network_area_route_payload, _request_auth, _content_type, _headers, @@ -32837,33 +40623,21 @@ def _update_network_area_route_serialize( _path_params["organizationId"] = organization_id if area_id is not None: _path_params["areaId"] = area_id - if route_id is not None: - _path_params["routeId"] = route_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - if update_network_area_route_payload is not None: - _body_params = update_network_area_route_payload # set the HTTP header `Accept` if "Accept" not in _header_params: _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) - # set the HTTP header `Content-Type` - if _content_type: - _header_params["Content-Type"] = _content_type - else: - _default_content_type = self.api_client.select_header_content_type(["application/json"]) - if _default_content_type is not None: - _header_params["Content-Type"] = _default_content_type - # authentication setting _auth_settings: List[str] = [] return self.api_client.param_serialize( - method="PATCH", - resource_path="/v1/organizations/{organizationId}/network-areas/{areaId}/routes/{routeId}", + method="GET", + resource_path="/v2beta1/organizations/{organizationId}/network-areas/{areaId}/regions", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -32877,21 +40651,14 @@ def _update_network_area_route_serialize( ) @validate_call - def update_nic( + def v2beta1_list_snapshots_in_project( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - network_id: Annotated[ - str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Network."), - ], - nic_id: Annotated[ - str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a network interface."), - ], - update_nic_payload: Annotated[UpdateNicPayload, Field(description="Request an update of a network interface.")], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + label_selector: Annotated[Optional[StrictStr], Field(description="Filter resources by labels.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -32901,19 +40668,17 @@ def update_nic( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> NIC: - """Update a network interface. + ) -> SnapshotListResponse: + """List all snapshots inside a project. - Update the properties of an existing network interface inside a network. + Get a list of all snapshots inside a project. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str - :param network_id: The identifier (ID) of a STACKIT Network. (required) - :type network_id: str - :param nic_id: The identifier (ID) of a network interface. (required) - :type nic_id: str - :param update_nic_payload: Request an update of a network interface. (required) - :type update_nic_payload: UpdateNicPayload + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param label_selector: Filter resources by labels. + :type label_selector: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -32936,11 +40701,10 @@ def update_nic( :return: Returns the result object. """ # noqa: E501 - _param = self._update_nic_serialize( + _param = self._v2beta1_list_snapshots_in_project_serialize( project_id=project_id, - network_id=network_id, - nic_id=nic_id, - update_nic_payload=update_nic_payload, + region=region, + label_selector=label_selector, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -32948,12 +40712,11 @@ def update_nic( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "NIC", + "200": "SnapshotListResponse", "400": "Error", "401": "Error", "403": "Error", "404": "Error", - "409": "Error", "500": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -32964,21 +40727,14 @@ def update_nic( ).data @validate_call - def update_nic_with_http_info( + def v2beta1_list_snapshots_in_project_with_http_info( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - network_id: Annotated[ - str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Network."), - ], - nic_id: Annotated[ - str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a network interface."), - ], - update_nic_payload: Annotated[UpdateNicPayload, Field(description="Request an update of a network interface.")], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + label_selector: Annotated[Optional[StrictStr], Field(description="Filter resources by labels.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -32988,19 +40744,17 @@ def update_nic_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[NIC]: - """Update a network interface. + ) -> ApiResponse[SnapshotListResponse]: + """List all snapshots inside a project. - Update the properties of an existing network interface inside a network. + Get a list of all snapshots inside a project. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str - :param network_id: The identifier (ID) of a STACKIT Network. (required) - :type network_id: str - :param nic_id: The identifier (ID) of a network interface. (required) - :type nic_id: str - :param update_nic_payload: Request an update of a network interface. (required) - :type update_nic_payload: UpdateNicPayload + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param label_selector: Filter resources by labels. + :type label_selector: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -33023,11 +40777,10 @@ def update_nic_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._update_nic_serialize( + _param = self._v2beta1_list_snapshots_in_project_serialize( project_id=project_id, - network_id=network_id, - nic_id=nic_id, - update_nic_payload=update_nic_payload, + region=region, + label_selector=label_selector, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -33035,12 +40788,11 @@ def update_nic_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "NIC", + "200": "SnapshotListResponse", "400": "Error", "401": "Error", "403": "Error", "404": "Error", - "409": "Error", "500": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -33051,21 +40803,14 @@ def update_nic_with_http_info( ) @validate_call - def update_nic_without_preload_content( + def v2beta1_list_snapshots_in_project_without_preload_content( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - network_id: Annotated[ - str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Network."), - ], - nic_id: Annotated[ - str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a network interface."), - ], - update_nic_payload: Annotated[UpdateNicPayload, Field(description="Request an update of a network interface.")], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + label_selector: Annotated[Optional[StrictStr], Field(description="Filter resources by labels.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -33076,18 +40821,16 @@ def update_nic_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Update a network interface. + """List all snapshots inside a project. - Update the properties of an existing network interface inside a network. + Get a list of all snapshots inside a project. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str - :param network_id: The identifier (ID) of a STACKIT Network. (required) - :type network_id: str - :param nic_id: The identifier (ID) of a network interface. (required) - :type nic_id: str - :param update_nic_payload: Request an update of a network interface. (required) - :type update_nic_payload: UpdateNicPayload + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param label_selector: Filter resources by labels. + :type label_selector: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -33110,11 +40853,10 @@ def update_nic_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._update_nic_serialize( + _param = self._v2beta1_list_snapshots_in_project_serialize( project_id=project_id, - network_id=network_id, - nic_id=nic_id, - update_nic_payload=update_nic_payload, + region=region, + label_selector=label_selector, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -33122,23 +40864,21 @@ def update_nic_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "NIC", + "200": "SnapshotListResponse", "400": "Error", "401": "Error", "403": "Error", "404": "Error", - "409": "Error", "500": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _update_nic_serialize( + def _v2beta1_list_snapshots_in_project_serialize( self, project_id, - network_id, - nic_id, - update_nic_payload, + region, + label_selector, _request_auth, _content_type, _headers, @@ -33159,35 +40899,27 @@ def _update_nic_serialize( # process the path parameters if project_id is not None: _path_params["projectId"] = project_id - if network_id is not None: - _path_params["networkId"] = network_id - if nic_id is not None: - _path_params["nicId"] = nic_id + if region is not None: + _path_params["region"] = region # process the query parameters + if label_selector is not None: + + _query_params.append(("label_selector", label_selector)) + # process the header parameters # process the form parameters # process the body parameter - if update_nic_payload is not None: - _body_params = update_nic_payload # set the HTTP header `Accept` if "Accept" not in _header_params: _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) - # set the HTTP header `Content-Type` - if _content_type: - _header_params["Content-Type"] = _content_type - else: - _default_content_type = self.api_client.select_header_content_type(["application/json"]) - if _default_content_type is not None: - _header_params["Content-Type"] = _default_content_type - # authentication setting _auth_settings: List[str] = [] return self.api_client.param_serialize( - method="PATCH", - resource_path="/v1/projects/{projectId}/networks/{networkId}/nics/{nicId}", + method="GET", + resource_path="/v2beta1/projects/{projectId}/regions/{region}/snapshots", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -33201,17 +40933,19 @@ def _update_nic_serialize( ) @validate_call - def update_public_ip( + def v2beta1_update_backup( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - public_ip_id: Annotated[ - str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a Public IP.") + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + backup_id: Annotated[ + str, + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Backup."), ], - update_public_ip_payload: Annotated[ - UpdatePublicIPPayload, Field(description="Request an update of a public IP.") + v2beta1_update_backup_payload: Annotated[ + V2beta1UpdateBackupPayload, Field(description="Request an update of a backup.") ], _request_timeout: Union[ None, @@ -33222,17 +40956,19 @@ def update_public_ip( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> PublicIp: - """Update a public IP. + ) -> Backup: + """Update information of a backup. - Update the properties of an existing public IP inside a project. + Update name or labels of the backup. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str - :param public_ip_id: The identifier (ID) of a Public IP. (required) - :type public_ip_id: str - :param update_public_ip_payload: Request an update of a public IP. (required) - :type update_public_ip_payload: UpdatePublicIPPayload + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param backup_id: The identifier (ID) of a STACKIT Backup. (required) + :type backup_id: str + :param v2beta1_update_backup_payload: Request an update of a backup. (required) + :type v2beta1_update_backup_payload: V2beta1UpdateBackupPayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -33255,10 +40991,11 @@ def update_public_ip( :return: Returns the result object. """ # noqa: E501 - _param = self._update_public_ip_serialize( + _param = self._v2beta1_update_backup_serialize( project_id=project_id, - public_ip_id=public_ip_id, - update_public_ip_payload=update_public_ip_payload, + region=region, + backup_id=backup_id, + v2beta1_update_backup_payload=v2beta1_update_backup_payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -33266,7 +41003,7 @@ def update_public_ip( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "PublicIp", + "200": "Backup", "400": "Error", "401": "Error", "403": "Error", @@ -33281,17 +41018,19 @@ def update_public_ip( ).data @validate_call - def update_public_ip_with_http_info( + def v2beta1_update_backup_with_http_info( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - public_ip_id: Annotated[ - str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a Public IP.") + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + backup_id: Annotated[ + str, + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Backup."), ], - update_public_ip_payload: Annotated[ - UpdatePublicIPPayload, Field(description="Request an update of a public IP.") + v2beta1_update_backup_payload: Annotated[ + V2beta1UpdateBackupPayload, Field(description="Request an update of a backup.") ], _request_timeout: Union[ None, @@ -33302,17 +41041,19 @@ def update_public_ip_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[PublicIp]: - """Update a public IP. + ) -> ApiResponse[Backup]: + """Update information of a backup. - Update the properties of an existing public IP inside a project. + Update name or labels of the backup. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str - :param public_ip_id: The identifier (ID) of a Public IP. (required) - :type public_ip_id: str - :param update_public_ip_payload: Request an update of a public IP. (required) - :type update_public_ip_payload: UpdatePublicIPPayload + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param backup_id: The identifier (ID) of a STACKIT Backup. (required) + :type backup_id: str + :param v2beta1_update_backup_payload: Request an update of a backup. (required) + :type v2beta1_update_backup_payload: V2beta1UpdateBackupPayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -33335,10 +41076,11 @@ def update_public_ip_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._update_public_ip_serialize( + _param = self._v2beta1_update_backup_serialize( project_id=project_id, - public_ip_id=public_ip_id, - update_public_ip_payload=update_public_ip_payload, + region=region, + backup_id=backup_id, + v2beta1_update_backup_payload=v2beta1_update_backup_payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -33346,7 +41088,7 @@ def update_public_ip_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "PublicIp", + "200": "Backup", "400": "Error", "401": "Error", "403": "Error", @@ -33361,17 +41103,19 @@ def update_public_ip_with_http_info( ) @validate_call - def update_public_ip_without_preload_content( + def v2beta1_update_backup_without_preload_content( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - public_ip_id: Annotated[ - str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a Public IP.") + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + backup_id: Annotated[ + str, + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Backup."), ], - update_public_ip_payload: Annotated[ - UpdatePublicIPPayload, Field(description="Request an update of a public IP.") + v2beta1_update_backup_payload: Annotated[ + V2beta1UpdateBackupPayload, Field(description="Request an update of a backup.") ], _request_timeout: Union[ None, @@ -33383,16 +41127,18 @@ def update_public_ip_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Update a public IP. + """Update information of a backup. - Update the properties of an existing public IP inside a project. + Update name or labels of the backup. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str - :param public_ip_id: The identifier (ID) of a Public IP. (required) - :type public_ip_id: str - :param update_public_ip_payload: Request an update of a public IP. (required) - :type update_public_ip_payload: UpdatePublicIPPayload + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param backup_id: The identifier (ID) of a STACKIT Backup. (required) + :type backup_id: str + :param v2beta1_update_backup_payload: Request an update of a backup. (required) + :type v2beta1_update_backup_payload: V2beta1UpdateBackupPayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -33415,10 +41161,11 @@ def update_public_ip_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._update_public_ip_serialize( + _param = self._v2beta1_update_backup_serialize( project_id=project_id, - public_ip_id=public_ip_id, - update_public_ip_payload=update_public_ip_payload, + region=region, + backup_id=backup_id, + v2beta1_update_backup_payload=v2beta1_update_backup_payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -33426,7 +41173,7 @@ def update_public_ip_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "PublicIp", + "200": "Backup", "400": "Error", "401": "Error", "403": "Error", @@ -33436,11 +41183,12 @@ def update_public_ip_without_preload_content( response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _update_public_ip_serialize( + def _v2beta1_update_backup_serialize( self, project_id, - public_ip_id, - update_public_ip_payload, + region, + backup_id, + v2beta1_update_backup_payload, _request_auth, _content_type, _headers, @@ -33461,14 +41209,16 @@ def _update_public_ip_serialize( # process the path parameters if project_id is not None: _path_params["projectId"] = project_id - if public_ip_id is not None: - _path_params["publicIpId"] = public_ip_id + if region is not None: + _path_params["region"] = region + if backup_id is not None: + _path_params["backupId"] = backup_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - if update_public_ip_payload is not None: - _body_params = update_public_ip_payload + if v2beta1_update_backup_payload is not None: + _body_params = v2beta1_update_backup_payload # set the HTTP header `Accept` if "Accept" not in _header_params: @@ -33487,7 +41237,7 @@ def _update_public_ip_serialize( return self.api_client.param_serialize( method="PATCH", - resource_path="/v1/projects/{projectId}/public-ips/{publicIpId}", + resource_path="/v2beta1/projects/{projectId}/regions/{region}/backups/{backupId}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -33501,23 +41251,23 @@ def _update_public_ip_serialize( ) @validate_call - def update_security_group( + def v2beta1_update_network_area_region( self, - project_id: Annotated[ + organization_id: Annotated[ str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), + Field( + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Organization." + ), ], - security_group_id: Annotated[ + area_id: Annotated[ str, Field( - min_length=36, - strict=True, - max_length=36, - description="The identifier (ID) of a STACKIT Security Group.", + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Network Area." ), ], - update_security_group_payload: Annotated[ - UpdateSecurityGroupPayload, Field(description="Request an update of a security group.") + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + v2beta1_update_network_area_region_payload: Annotated[ + V2beta1UpdateNetworkAreaRegionPayload, Field(description="Request an update of a regional network area.") ], _request_timeout: Union[ None, @@ -33528,17 +41278,19 @@ def update_security_group( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> SecurityGroup: - """Update information of a security group. + ) -> RegionalArea: + """Update a region for a network area. - Update labels of the security group. + Update a new region for a network area. - :param project_id: The identifier (ID) of a STACKIT Project. (required) - :type project_id: str - :param security_group_id: The identifier (ID) of a STACKIT Security Group. (required) - :type security_group_id: str - :param update_security_group_payload: Request an update of a security group. (required) - :type update_security_group_payload: UpdateSecurityGroupPayload + :param organization_id: The identifier (ID) of a STACKIT Organization. (required) + :type organization_id: str + :param area_id: The identifier (ID) of a STACKIT Network Area. (required) + :type area_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param v2beta1_update_network_area_region_payload: Request an update of a regional network area. (required) + :type v2beta1_update_network_area_region_payload: V2beta1UpdateNetworkAreaRegionPayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -33561,10 +41313,11 @@ def update_security_group( :return: Returns the result object. """ # noqa: E501 - _param = self._update_security_group_serialize( - project_id=project_id, - security_group_id=security_group_id, - update_security_group_payload=update_security_group_payload, + _param = self._v2beta1_update_network_area_region_serialize( + organization_id=organization_id, + area_id=area_id, + region=region, + v2beta1_update_network_area_region_payload=v2beta1_update_network_area_region_payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -33572,11 +41325,12 @@ def update_security_group( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "SecurityGroup", + "200": "RegionalArea", "400": "Error", "401": "Error", "403": "Error", "404": "Error", + "409": "Error", "500": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -33587,23 +41341,23 @@ def update_security_group( ).data @validate_call - def update_security_group_with_http_info( + def v2beta1_update_network_area_region_with_http_info( self, - project_id: Annotated[ + organization_id: Annotated[ str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), + Field( + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Organization." + ), ], - security_group_id: Annotated[ + area_id: Annotated[ str, Field( - min_length=36, - strict=True, - max_length=36, - description="The identifier (ID) of a STACKIT Security Group.", + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Network Area." ), ], - update_security_group_payload: Annotated[ - UpdateSecurityGroupPayload, Field(description="Request an update of a security group.") + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + v2beta1_update_network_area_region_payload: Annotated[ + V2beta1UpdateNetworkAreaRegionPayload, Field(description="Request an update of a regional network area.") ], _request_timeout: Union[ None, @@ -33614,17 +41368,19 @@ def update_security_group_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[SecurityGroup]: - """Update information of a security group. + ) -> ApiResponse[RegionalArea]: + """Update a region for a network area. - Update labels of the security group. + Update a new region for a network area. - :param project_id: The identifier (ID) of a STACKIT Project. (required) - :type project_id: str - :param security_group_id: The identifier (ID) of a STACKIT Security Group. (required) - :type security_group_id: str - :param update_security_group_payload: Request an update of a security group. (required) - :type update_security_group_payload: UpdateSecurityGroupPayload + :param organization_id: The identifier (ID) of a STACKIT Organization. (required) + :type organization_id: str + :param area_id: The identifier (ID) of a STACKIT Network Area. (required) + :type area_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param v2beta1_update_network_area_region_payload: Request an update of a regional network area. (required) + :type v2beta1_update_network_area_region_payload: V2beta1UpdateNetworkAreaRegionPayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -33647,10 +41403,11 @@ def update_security_group_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._update_security_group_serialize( - project_id=project_id, - security_group_id=security_group_id, - update_security_group_payload=update_security_group_payload, + _param = self._v2beta1_update_network_area_region_serialize( + organization_id=organization_id, + area_id=area_id, + region=region, + v2beta1_update_network_area_region_payload=v2beta1_update_network_area_region_payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -33658,11 +41415,12 @@ def update_security_group_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "SecurityGroup", + "200": "RegionalArea", "400": "Error", "401": "Error", "403": "Error", "404": "Error", + "409": "Error", "500": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) @@ -33673,23 +41431,23 @@ def update_security_group_with_http_info( ) @validate_call - def update_security_group_without_preload_content( + def v2beta1_update_network_area_region_without_preload_content( self, - project_id: Annotated[ + organization_id: Annotated[ str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), + Field( + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Organization." + ), ], - security_group_id: Annotated[ + area_id: Annotated[ str, Field( - min_length=36, - strict=True, - max_length=36, - description="The identifier (ID) of a STACKIT Security Group.", + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Network Area." ), ], - update_security_group_payload: Annotated[ - UpdateSecurityGroupPayload, Field(description="Request an update of a security group.") + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + v2beta1_update_network_area_region_payload: Annotated[ + V2beta1UpdateNetworkAreaRegionPayload, Field(description="Request an update of a regional network area.") ], _request_timeout: Union[ None, @@ -33701,16 +41459,18 @@ def update_security_group_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Update information of a security group. + """Update a region for a network area. - Update labels of the security group. + Update a new region for a network area. - :param project_id: The identifier (ID) of a STACKIT Project. (required) - :type project_id: str - :param security_group_id: The identifier (ID) of a STACKIT Security Group. (required) - :type security_group_id: str - :param update_security_group_payload: Request an update of a security group. (required) - :type update_security_group_payload: UpdateSecurityGroupPayload + :param organization_id: The identifier (ID) of a STACKIT Organization. (required) + :type organization_id: str + :param area_id: The identifier (ID) of a STACKIT Network Area. (required) + :type area_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param v2beta1_update_network_area_region_payload: Request an update of a regional network area. (required) + :type v2beta1_update_network_area_region_payload: V2beta1UpdateNetworkAreaRegionPayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -33733,10 +41493,11 @@ def update_security_group_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._update_security_group_serialize( - project_id=project_id, - security_group_id=security_group_id, - update_security_group_payload=update_security_group_payload, + _param = self._v2beta1_update_network_area_region_serialize( + organization_id=organization_id, + area_id=area_id, + region=region, + v2beta1_update_network_area_region_payload=v2beta1_update_network_area_region_payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -33744,21 +41505,23 @@ def update_security_group_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "SecurityGroup", + "200": "RegionalArea", "400": "Error", "401": "Error", "403": "Error", "404": "Error", + "409": "Error", "500": "Error", } response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _update_security_group_serialize( + def _v2beta1_update_network_area_region_serialize( self, - project_id, - security_group_id, - update_security_group_payload, + organization_id, + area_id, + region, + v2beta1_update_network_area_region_payload, _request_auth, _content_type, _headers, @@ -33777,16 +41540,18 @@ def _update_security_group_serialize( _body_params: Optional[bytes] = None # process the path parameters - if project_id is not None: - _path_params["projectId"] = project_id - if security_group_id is not None: - _path_params["securityGroupId"] = security_group_id + if organization_id is not None: + _path_params["organizationId"] = organization_id + if area_id is not None: + _path_params["areaId"] = area_id + if region is not None: + _path_params["region"] = region # process the query parameters # process the header parameters # process the form parameters # process the body parameter - if update_security_group_payload is not None: - _body_params = update_security_group_payload + if v2beta1_update_network_area_region_payload is not None: + _body_params = v2beta1_update_network_area_region_payload # set the HTTP header `Accept` if "Accept" not in _header_params: @@ -33805,7 +41570,7 @@ def _update_security_group_serialize( return self.api_client.param_serialize( method="PATCH", - resource_path="/v1/projects/{projectId}/security-groups/{securityGroupId}", + resource_path="/v2beta1/organizations/{organizationId}/network-areas/{areaId}/regions/{region}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -33819,17 +41584,27 @@ def _update_security_group_serialize( ) @validate_call - def update_server( + def v2beta1_update_route_of_area( self, - project_id: Annotated[ + organization_id: Annotated[ str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), + Field( + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Organization." + ), ], - server_id: Annotated[ + area_id: Annotated[ str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Server."), + Field( + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Network Area." + ), + ], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + route_id: Annotated[ + str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Route.") + ], + v2beta1_update_route_of_area_payload: Annotated[ + V2beta1UpdateRouteOfAreaPayload, Field(description="Request an update of a network route.") ], - update_server_payload: Annotated[UpdateServerPayload, Field(description="Request an update of a server.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -33839,17 +41614,21 @@ def update_server( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> Server: - """Update information of a server. + ) -> Route: + """Update a network route. - Update name or labels of the server. + Update a network route defined in a network area. - :param project_id: The identifier (ID) of a STACKIT Project. (required) - :type project_id: str - :param server_id: The identifier (ID) of a STACKIT Server. (required) - :type server_id: str - :param update_server_payload: Request an update of a server. (required) - :type update_server_payload: UpdateServerPayload + :param organization_id: The identifier (ID) of a STACKIT Organization. (required) + :type organization_id: str + :param area_id: The identifier (ID) of a STACKIT Network Area. (required) + :type area_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param route_id: The identifier (ID) of a STACKIT Route. (required) + :type route_id: str + :param v2beta1_update_route_of_area_payload: Request an update of a network route. (required) + :type v2beta1_update_route_of_area_payload: V2beta1UpdateRouteOfAreaPayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -33872,10 +41651,12 @@ def update_server( :return: Returns the result object. """ # noqa: E501 - _param = self._update_server_serialize( - project_id=project_id, - server_id=server_id, - update_server_payload=update_server_payload, + _param = self._v2beta1_update_route_of_area_serialize( + organization_id=organization_id, + area_id=area_id, + region=region, + route_id=route_id, + v2beta1_update_route_of_area_payload=v2beta1_update_route_of_area_payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -33883,7 +41664,7 @@ def update_server( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Server", + "200": "Route", "400": "Error", "401": "Error", "403": "Error", @@ -33898,17 +41679,27 @@ def update_server( ).data @validate_call - def update_server_with_http_info( + def v2beta1_update_route_of_area_with_http_info( self, - project_id: Annotated[ + organization_id: Annotated[ str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), + Field( + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Organization." + ), ], - server_id: Annotated[ + area_id: Annotated[ str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Server."), + Field( + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Network Area." + ), + ], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + route_id: Annotated[ + str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Route.") + ], + v2beta1_update_route_of_area_payload: Annotated[ + V2beta1UpdateRouteOfAreaPayload, Field(description="Request an update of a network route.") ], - update_server_payload: Annotated[UpdateServerPayload, Field(description="Request an update of a server.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -33918,17 +41709,21 @@ def update_server_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[Server]: - """Update information of a server. + ) -> ApiResponse[Route]: + """Update a network route. - Update name or labels of the server. + Update a network route defined in a network area. - :param project_id: The identifier (ID) of a STACKIT Project. (required) - :type project_id: str - :param server_id: The identifier (ID) of a STACKIT Server. (required) - :type server_id: str - :param update_server_payload: Request an update of a server. (required) - :type update_server_payload: UpdateServerPayload + :param organization_id: The identifier (ID) of a STACKIT Organization. (required) + :type organization_id: str + :param area_id: The identifier (ID) of a STACKIT Network Area. (required) + :type area_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param route_id: The identifier (ID) of a STACKIT Route. (required) + :type route_id: str + :param v2beta1_update_route_of_area_payload: Request an update of a network route. (required) + :type v2beta1_update_route_of_area_payload: V2beta1UpdateRouteOfAreaPayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -33951,10 +41746,12 @@ def update_server_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._update_server_serialize( - project_id=project_id, - server_id=server_id, - update_server_payload=update_server_payload, + _param = self._v2beta1_update_route_of_area_serialize( + organization_id=organization_id, + area_id=area_id, + region=region, + route_id=route_id, + v2beta1_update_route_of_area_payload=v2beta1_update_route_of_area_payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -33962,7 +41759,7 @@ def update_server_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Server", + "200": "Route", "400": "Error", "401": "Error", "403": "Error", @@ -33977,17 +41774,27 @@ def update_server_with_http_info( ) @validate_call - def update_server_without_preload_content( + def v2beta1_update_route_of_area_without_preload_content( self, - project_id: Annotated[ + organization_id: Annotated[ str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), + Field( + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Organization." + ), ], - server_id: Annotated[ + area_id: Annotated[ str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Server."), + Field( + min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Network Area." + ), + ], + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + route_id: Annotated[ + str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Route.") + ], + v2beta1_update_route_of_area_payload: Annotated[ + V2beta1UpdateRouteOfAreaPayload, Field(description="Request an update of a network route.") ], - update_server_payload: Annotated[UpdateServerPayload, Field(description="Request an update of a server.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -33998,16 +41805,20 @@ def update_server_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Update information of a server. + """Update a network route. - Update name or labels of the server. + Update a network route defined in a network area. - :param project_id: The identifier (ID) of a STACKIT Project. (required) - :type project_id: str - :param server_id: The identifier (ID) of a STACKIT Server. (required) - :type server_id: str - :param update_server_payload: Request an update of a server. (required) - :type update_server_payload: UpdateServerPayload + :param organization_id: The identifier (ID) of a STACKIT Organization. (required) + :type organization_id: str + :param area_id: The identifier (ID) of a STACKIT Network Area. (required) + :type area_id: str + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param route_id: The identifier (ID) of a STACKIT Route. (required) + :type route_id: str + :param v2beta1_update_route_of_area_payload: Request an update of a network route. (required) + :type v2beta1_update_route_of_area_payload: V2beta1UpdateRouteOfAreaPayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -34030,10 +41841,12 @@ def update_server_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._update_server_serialize( - project_id=project_id, - server_id=server_id, - update_server_payload=update_server_payload, + _param = self._v2beta1_update_route_of_area_serialize( + organization_id=organization_id, + area_id=area_id, + region=region, + route_id=route_id, + v2beta1_update_route_of_area_payload=v2beta1_update_route_of_area_payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -34041,7 +41854,7 @@ def update_server_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Server", + "200": "Route", "400": "Error", "401": "Error", "403": "Error", @@ -34051,11 +41864,13 @@ def update_server_without_preload_content( response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _update_server_serialize( + def _v2beta1_update_route_of_area_serialize( self, - project_id, - server_id, - update_server_payload, + organization_id, + area_id, + region, + route_id, + v2beta1_update_route_of_area_payload, _request_auth, _content_type, _headers, @@ -34074,16 +41889,20 @@ def _update_server_serialize( _body_params: Optional[bytes] = None # process the path parameters - if project_id is not None: - _path_params["projectId"] = project_id - if server_id is not None: - _path_params["serverId"] = server_id + if organization_id is not None: + _path_params["organizationId"] = organization_id + if area_id is not None: + _path_params["areaId"] = area_id + if region is not None: + _path_params["region"] = region + if route_id is not None: + _path_params["routeId"] = route_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - if update_server_payload is not None: - _body_params = update_server_payload + if v2beta1_update_route_of_area_payload is not None: + _body_params = v2beta1_update_route_of_area_payload # set the HTTP header `Accept` if "Accept" not in _header_params: @@ -34102,7 +41921,7 @@ def _update_server_serialize( return self.api_client.param_serialize( method="PATCH", - resource_path="/v1/projects/{projectId}/servers/{serverId}", + resource_path="/v2beta1/organizations/{organizationId}/network-areas/{areaId}/regions/{region}/routes/{routeId}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -34116,18 +41935,24 @@ def _update_server_serialize( ) @validate_call - def update_snapshot( + def v2beta1_update_security_group( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - snapshot_id: Annotated[ + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + security_group_id: Annotated[ str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Snapshot."), + Field( + min_length=36, + strict=True, + max_length=36, + description="The identifier (ID) of a STACKIT Security Group.", + ), ], - update_snapshot_payload: Annotated[ - UpdateSnapshotPayload, Field(description="Request an update of a snapshot.") + v2beta1_update_security_group_payload: Annotated[ + V2beta1UpdateSecurityGroupPayload, Field(description="Request an update of a security group.") ], _request_timeout: Union[ None, @@ -34138,17 +41963,19 @@ def update_snapshot( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> Snapshot: - """Update information of the snapshot. + ) -> SecurityGroup: + """Update information of a security group. - Update information like name or labels of the snapshot. + Update labels of the security group. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str - :param snapshot_id: The identifier (ID) of a STACKIT Snapshot. (required) - :type snapshot_id: str - :param update_snapshot_payload: Request an update of a snapshot. (required) - :type update_snapshot_payload: UpdateSnapshotPayload + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param security_group_id: The identifier (ID) of a STACKIT Security Group. (required) + :type security_group_id: str + :param v2beta1_update_security_group_payload: Request an update of a security group. (required) + :type v2beta1_update_security_group_payload: V2beta1UpdateSecurityGroupPayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -34171,10 +41998,11 @@ def update_snapshot( :return: Returns the result object. """ # noqa: E501 - _param = self._update_snapshot_serialize( + _param = self._v2beta1_update_security_group_serialize( project_id=project_id, - snapshot_id=snapshot_id, - update_snapshot_payload=update_snapshot_payload, + region=region, + security_group_id=security_group_id, + v2beta1_update_security_group_payload=v2beta1_update_security_group_payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -34182,7 +42010,7 @@ def update_snapshot( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Snapshot", + "200": "SecurityGroup", "400": "Error", "401": "Error", "403": "Error", @@ -34197,18 +42025,24 @@ def update_snapshot( ).data @validate_call - def update_snapshot_with_http_info( + def v2beta1_update_security_group_with_http_info( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - snapshot_id: Annotated[ + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + security_group_id: Annotated[ str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Snapshot."), + Field( + min_length=36, + strict=True, + max_length=36, + description="The identifier (ID) of a STACKIT Security Group.", + ), ], - update_snapshot_payload: Annotated[ - UpdateSnapshotPayload, Field(description="Request an update of a snapshot.") + v2beta1_update_security_group_payload: Annotated[ + V2beta1UpdateSecurityGroupPayload, Field(description="Request an update of a security group.") ], _request_timeout: Union[ None, @@ -34219,17 +42053,19 @@ def update_snapshot_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[Snapshot]: - """Update information of the snapshot. + ) -> ApiResponse[SecurityGroup]: + """Update information of a security group. - Update information like name or labels of the snapshot. + Update labels of the security group. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str - :param snapshot_id: The identifier (ID) of a STACKIT Snapshot. (required) - :type snapshot_id: str - :param update_snapshot_payload: Request an update of a snapshot. (required) - :type update_snapshot_payload: UpdateSnapshotPayload + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param security_group_id: The identifier (ID) of a STACKIT Security Group. (required) + :type security_group_id: str + :param v2beta1_update_security_group_payload: Request an update of a security group. (required) + :type v2beta1_update_security_group_payload: V2beta1UpdateSecurityGroupPayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -34252,10 +42088,11 @@ def update_snapshot_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._update_snapshot_serialize( + _param = self._v2beta1_update_security_group_serialize( project_id=project_id, - snapshot_id=snapshot_id, - update_snapshot_payload=update_snapshot_payload, + region=region, + security_group_id=security_group_id, + v2beta1_update_security_group_payload=v2beta1_update_security_group_payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -34263,7 +42100,7 @@ def update_snapshot_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Snapshot", + "200": "SecurityGroup", "400": "Error", "401": "Error", "403": "Error", @@ -34278,18 +42115,24 @@ def update_snapshot_with_http_info( ) @validate_call - def update_snapshot_without_preload_content( + def v2beta1_update_security_group_without_preload_content( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - snapshot_id: Annotated[ + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + security_group_id: Annotated[ str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Snapshot."), + Field( + min_length=36, + strict=True, + max_length=36, + description="The identifier (ID) of a STACKIT Security Group.", + ), ], - update_snapshot_payload: Annotated[ - UpdateSnapshotPayload, Field(description="Request an update of a snapshot.") + v2beta1_update_security_group_payload: Annotated[ + V2beta1UpdateSecurityGroupPayload, Field(description="Request an update of a security group.") ], _request_timeout: Union[ None, @@ -34301,16 +42144,18 @@ def update_snapshot_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Update information of the snapshot. + """Update information of a security group. - Update information like name or labels of the snapshot. + Update labels of the security group. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str - :param snapshot_id: The identifier (ID) of a STACKIT Snapshot. (required) - :type snapshot_id: str - :param update_snapshot_payload: Request an update of a snapshot. (required) - :type update_snapshot_payload: UpdateSnapshotPayload + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param security_group_id: The identifier (ID) of a STACKIT Security Group. (required) + :type security_group_id: str + :param v2beta1_update_security_group_payload: Request an update of a security group. (required) + :type v2beta1_update_security_group_payload: V2beta1UpdateSecurityGroupPayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -34333,10 +42178,11 @@ def update_snapshot_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._update_snapshot_serialize( + _param = self._v2beta1_update_security_group_serialize( project_id=project_id, - snapshot_id=snapshot_id, - update_snapshot_payload=update_snapshot_payload, + region=region, + security_group_id=security_group_id, + v2beta1_update_security_group_payload=v2beta1_update_security_group_payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -34344,7 +42190,7 @@ def update_snapshot_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Snapshot", + "200": "SecurityGroup", "400": "Error", "401": "Error", "403": "Error", @@ -34354,11 +42200,12 @@ def update_snapshot_without_preload_content( response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _update_snapshot_serialize( + def _v2beta1_update_security_group_serialize( self, project_id, - snapshot_id, - update_snapshot_payload, + region, + security_group_id, + v2beta1_update_security_group_payload, _request_auth, _content_type, _headers, @@ -34379,14 +42226,16 @@ def _update_snapshot_serialize( # process the path parameters if project_id is not None: _path_params["projectId"] = project_id - if snapshot_id is not None: - _path_params["snapshotId"] = snapshot_id + if region is not None: + _path_params["region"] = region + if security_group_id is not None: + _path_params["securityGroupId"] = security_group_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - if update_snapshot_payload is not None: - _body_params = update_snapshot_payload + if v2beta1_update_security_group_payload is not None: + _body_params = v2beta1_update_security_group_payload # set the HTTP header `Accept` if "Accept" not in _header_params: @@ -34405,7 +42254,7 @@ def _update_snapshot_serialize( return self.api_client.param_serialize( method="PATCH", - resource_path="/v1/projects/{projectId}/snapshots/{snapshotId}", + resource_path="/v2beta1/projects/{projectId}/regions/{region}/security-groups/{securityGroupId}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -34419,17 +42268,20 @@ def _update_snapshot_serialize( ) @validate_call - def update_volume( + def v2beta1_update_snapshot( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - volume_id: Annotated[ + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + snapshot_id: Annotated[ str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Volume."), + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Snapshot."), + ], + v2beta1_update_snapshot_payload: Annotated[ + V2beta1UpdateSnapshotPayload, Field(description="Request an update of a snapshot.") ], - update_volume_payload: Annotated[UpdateVolumePayload, Field(description="Request an update of a volume.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -34439,17 +42291,19 @@ def update_volume( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> Volume: - """Update information of a volume. + ) -> Snapshot: + """Update information of the snapshot. - Update name, description or labels of the volume. + Update information like name or labels of the snapshot. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str - :param volume_id: The identifier (ID) of a STACKIT Volume. (required) - :type volume_id: str - :param update_volume_payload: Request an update of a volume. (required) - :type update_volume_payload: UpdateVolumePayload + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param snapshot_id: The identifier (ID) of a STACKIT Snapshot. (required) + :type snapshot_id: str + :param v2beta1_update_snapshot_payload: Request an update of a snapshot. (required) + :type v2beta1_update_snapshot_payload: V2beta1UpdateSnapshotPayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -34472,10 +42326,11 @@ def update_volume( :return: Returns the result object. """ # noqa: E501 - _param = self._update_volume_serialize( + _param = self._v2beta1_update_snapshot_serialize( project_id=project_id, - volume_id=volume_id, - update_volume_payload=update_volume_payload, + region=region, + snapshot_id=snapshot_id, + v2beta1_update_snapshot_payload=v2beta1_update_snapshot_payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -34483,7 +42338,7 @@ def update_volume( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Volume", + "200": "Snapshot", "400": "Error", "401": "Error", "403": "Error", @@ -34498,17 +42353,20 @@ def update_volume( ).data @validate_call - def update_volume_with_http_info( + def v2beta1_update_snapshot_with_http_info( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - volume_id: Annotated[ + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + snapshot_id: Annotated[ str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Volume."), + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Snapshot."), + ], + v2beta1_update_snapshot_payload: Annotated[ + V2beta1UpdateSnapshotPayload, Field(description="Request an update of a snapshot.") ], - update_volume_payload: Annotated[UpdateVolumePayload, Field(description="Request an update of a volume.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -34518,17 +42376,19 @@ def update_volume_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[Volume]: - """Update information of a volume. + ) -> ApiResponse[Snapshot]: + """Update information of the snapshot. - Update name, description or labels of the volume. + Update information like name or labels of the snapshot. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str - :param volume_id: The identifier (ID) of a STACKIT Volume. (required) - :type volume_id: str - :param update_volume_payload: Request an update of a volume. (required) - :type update_volume_payload: UpdateVolumePayload + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param snapshot_id: The identifier (ID) of a STACKIT Snapshot. (required) + :type snapshot_id: str + :param v2beta1_update_snapshot_payload: Request an update of a snapshot. (required) + :type v2beta1_update_snapshot_payload: V2beta1UpdateSnapshotPayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -34551,10 +42411,11 @@ def update_volume_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._update_volume_serialize( + _param = self._v2beta1_update_snapshot_serialize( project_id=project_id, - volume_id=volume_id, - update_volume_payload=update_volume_payload, + region=region, + snapshot_id=snapshot_id, + v2beta1_update_snapshot_payload=v2beta1_update_snapshot_payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -34562,7 +42423,7 @@ def update_volume_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Volume", + "200": "Snapshot", "400": "Error", "401": "Error", "403": "Error", @@ -34577,17 +42438,20 @@ def update_volume_with_http_info( ) @validate_call - def update_volume_without_preload_content( + def v2beta1_update_snapshot_without_preload_content( self, project_id: Annotated[ str, Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."), ], - volume_id: Annotated[ + region: Annotated[StrictStr, Field(description="The STACKIT Region of the resources.")], + snapshot_id: Annotated[ str, - Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Volume."), + Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Snapshot."), + ], + v2beta1_update_snapshot_payload: Annotated[ + V2beta1UpdateSnapshotPayload, Field(description="Request an update of a snapshot.") ], - update_volume_payload: Annotated[UpdateVolumePayload, Field(description="Request an update of a volume.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -34598,16 +42462,18 @@ def update_volume_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Update information of a volume. + """Update information of the snapshot. - Update name, description or labels of the volume. + Update information like name or labels of the snapshot. :param project_id: The identifier (ID) of a STACKIT Project. (required) :type project_id: str - :param volume_id: The identifier (ID) of a STACKIT Volume. (required) - :type volume_id: str - :param update_volume_payload: Request an update of a volume. (required) - :type update_volume_payload: UpdateVolumePayload + :param region: The STACKIT Region of the resources. (required) + :type region: str + :param snapshot_id: The identifier (ID) of a STACKIT Snapshot. (required) + :type snapshot_id: str + :param v2beta1_update_snapshot_payload: Request an update of a snapshot. (required) + :type v2beta1_update_snapshot_payload: V2beta1UpdateSnapshotPayload :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -34630,10 +42496,11 @@ def update_volume_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._update_volume_serialize( + _param = self._v2beta1_update_snapshot_serialize( project_id=project_id, - volume_id=volume_id, - update_volume_payload=update_volume_payload, + region=region, + snapshot_id=snapshot_id, + v2beta1_update_snapshot_payload=v2beta1_update_snapshot_payload, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -34641,7 +42508,7 @@ def update_volume_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - "200": "Volume", + "200": "Snapshot", "400": "Error", "401": "Error", "403": "Error", @@ -34651,11 +42518,12 @@ def update_volume_without_preload_content( response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) return response_data.response - def _update_volume_serialize( + def _v2beta1_update_snapshot_serialize( self, project_id, - volume_id, - update_volume_payload, + region, + snapshot_id, + v2beta1_update_snapshot_payload, _request_auth, _content_type, _headers, @@ -34676,14 +42544,16 @@ def _update_volume_serialize( # process the path parameters if project_id is not None: _path_params["projectId"] = project_id - if volume_id is not None: - _path_params["volumeId"] = volume_id + if region is not None: + _path_params["region"] = region + if snapshot_id is not None: + _path_params["snapshotId"] = snapshot_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - if update_volume_payload is not None: - _body_params = update_volume_payload + if v2beta1_update_snapshot_payload is not None: + _body_params = v2beta1_update_snapshot_payload # set the HTTP header `Accept` if "Accept" not in _header_params: @@ -34702,7 +42572,7 @@ def _update_volume_serialize( return self.api_client.param_serialize( method="PATCH", - resource_path="/v1/projects/{projectId}/volumes/{volumeId}", + resource_path="/v2beta1/projects/{projectId}/regions/{region}/snapshots/{snapshotId}", path_params=_path_params, query_params=_query_params, header_params=_header_params, diff --git a/services/iaas/src/stackit/iaas/api_client.py b/services/iaas/src/stackit/iaas/api_client.py index 081fdc06..a2fd69d8 100644 --- a/services/iaas/src/stackit/iaas/api_client.py +++ b/services/iaas/src/stackit/iaas/api_client.py @@ -5,7 +5,7 @@ This API allows you to create and modify IaaS resources. - The version of the OpenAPI document: 1 + The version of the OpenAPI document: 2beta1 Contact: stackit-iaas@mail.schwarz Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/services/iaas/src/stackit/iaas/configuration.py b/services/iaas/src/stackit/iaas/configuration.py index afb586a5..cf437d94 100644 --- a/services/iaas/src/stackit/iaas/configuration.py +++ b/services/iaas/src/stackit/iaas/configuration.py @@ -5,7 +5,7 @@ This API allows you to create and modify IaaS resources. - The version of the OpenAPI document: 1 + The version of the OpenAPI document: 2beta1 Contact: stackit-iaas@mail.schwarz Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -54,7 +54,7 @@ def __init__( ) """Constructor """ - self._base_path = "https://iaas.api.eu01.stackit.cloud" + self._base_path = "https://iaas.api.stackit.cloud" """Default Base url """ self.server_index = 0 if server_index is None else server_index @@ -78,13 +78,12 @@ def get_host_settings(self) -> List[HostSetting]: """ return [ { - "url": "https://iaas.api.{region}stackit.cloud", + "url": "https://iaas.api.stackit.cloud", "description": "No description provided", "variables": { "region": { "description": "No description provided", - "default_value": "eu01.", - "enum_values": ["eu01."], + "default_value": "global", } }, } diff --git a/services/iaas/src/stackit/iaas/exceptions.py b/services/iaas/src/stackit/iaas/exceptions.py index a80d8441..40f567a3 100644 --- a/services/iaas/src/stackit/iaas/exceptions.py +++ b/services/iaas/src/stackit/iaas/exceptions.py @@ -5,7 +5,7 @@ This API allows you to create and modify IaaS resources. - The version of the OpenAPI document: 1 + The version of the OpenAPI document: 2beta1 Contact: stackit-iaas@mail.schwarz Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/services/iaas/src/stackit/iaas/models/__init__.py b/services/iaas/src/stackit/iaas/models/__init__.py index 1e7590a3..6d7caf69 100644 --- a/services/iaas/src/stackit/iaas/models/__init__.py +++ b/services/iaas/src/stackit/iaas/models/__init__.py @@ -6,7 +6,7 @@ This API allows you to create and modify IaaS resources. - The version of the OpenAPI document: 1 + The version of the OpenAPI document: 2beta1 Contact: stackit-iaas@mail.schwarz Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -15,14 +15,17 @@ # import models into model package +from stackit.iaas.models.add_routes_to_routing_table_payload import ( + AddRoutesToRoutingTablePayload, +) +from stackit.iaas.models.add_routing_table_to_area_payload import ( + AddRoutingTableToAreaPayload, +) from stackit.iaas.models.add_volume_to_server_payload import AddVolumeToServerPayload from stackit.iaas.models.affinity_group import AffinityGroup from stackit.iaas.models.affinity_group_list_response import AffinityGroupListResponse from stackit.iaas.models.allowed_addresses_inner import AllowedAddressesInner -from stackit.iaas.models.area import Area -from stackit.iaas.models.area_config import AreaConfig from stackit.iaas.models.area_id import AreaId -from stackit.iaas.models.area_prefix_config_ipv4 import AreaPrefixConfigIPv4 from stackit.iaas.models.availability_zone_list_response import ( AvailabilityZoneListResponse, ) @@ -33,12 +36,15 @@ from stackit.iaas.models.boot_volume import BootVolume from stackit.iaas.models.boot_volume_source import BootVolumeSource from stackit.iaas.models.create_affinity_group_payload import CreateAffinityGroupPayload -from stackit.iaas.models.create_area_address_family import CreateAreaAddressFamily -from stackit.iaas.models.create_area_ipv4 import CreateAreaIPv4 from stackit.iaas.models.create_backup_payload import CreateBackupPayload from stackit.iaas.models.create_image_payload import CreateImagePayload from stackit.iaas.models.create_key_pair_payload import CreateKeyPairPayload -from stackit.iaas.models.create_network_address_family import CreateNetworkAddressFamily +from stackit.iaas.models.create_management_network_payload import ( + CreateManagementNetworkPayload, +) +from stackit.iaas.models.create_management_network_route_payload import ( + CreateManagementNetworkRoutePayload, +) from stackit.iaas.models.create_network_area_payload import CreateNetworkAreaPayload from stackit.iaas.models.create_network_area_range_payload import ( CreateNetworkAreaRangePayload, @@ -46,8 +52,20 @@ from stackit.iaas.models.create_network_area_route_payload import ( CreateNetworkAreaRoutePayload, ) -from stackit.iaas.models.create_network_ipv4_body import CreateNetworkIPv4Body -from stackit.iaas.models.create_network_ipv6_body import CreateNetworkIPv6Body +from stackit.iaas.models.create_network_ipv4 import CreateNetworkIPv4 +from stackit.iaas.models.create_network_ipv4_with_prefix import ( + CreateNetworkIPv4WithPrefix, +) +from stackit.iaas.models.create_network_ipv4_with_prefix_length import ( + CreateNetworkIPv4WithPrefixLength, +) +from stackit.iaas.models.create_network_ipv6 import CreateNetworkIPv6 +from stackit.iaas.models.create_network_ipv6_with_prefix import ( + CreateNetworkIPv6WithPrefix, +) +from stackit.iaas.models.create_network_ipv6_with_prefix_length import ( + CreateNetworkIPv6WithPrefixLength, +) from stackit.iaas.models.create_network_payload import CreateNetworkPayload from stackit.iaas.models.create_nic_payload import CreateNicPayload from stackit.iaas.models.create_protocol import CreateProtocol @@ -64,11 +82,12 @@ CreateServerNetworkingWithNics, ) from stackit.iaas.models.create_server_payload import CreateServerPayload -from stackit.iaas.models.create_server_payload_networking import ( - CreateServerPayloadNetworking, +from stackit.iaas.models.create_server_payload_all_of_networking import ( + CreateServerPayloadAllOfNetworking, ) -from stackit.iaas.models.create_snapshot_payload import CreateSnapshotPayload from stackit.iaas.models.create_volume_payload import CreateVolumePayload +from stackit.iaas.models.destination_cidrv4 import DestinationCIDRv4 +from stackit.iaas.models.destination_cidrv6 import DestinationCIDRv6 from stackit.iaas.models.error import Error from stackit.iaas.models.get_server_log200_response import GetServerLog200Response from stackit.iaas.models.icmp_parameters import ICMPParameters @@ -84,13 +103,24 @@ from stackit.iaas.models.keypair import Keypair from stackit.iaas.models.machine_type import MachineType from stackit.iaas.models.machine_type_list_response import MachineTypeListResponse +from stackit.iaas.models.management_route import ManagementRoute +from stackit.iaas.models.management_route_destination import ManagementRouteDestination +from stackit.iaas.models.management_route_list_response import ( + ManagementRouteListResponse, +) +from stackit.iaas.models.management_route_nexthop import ManagementRouteNexthop from stackit.iaas.models.network import Network from stackit.iaas.models.network_area import NetworkArea -from stackit.iaas.models.network_area_ipv4 import NetworkAreaIPv4 from stackit.iaas.models.network_area_list_response import NetworkAreaListResponse +from stackit.iaas.models.network_ipv4 import NetworkIPv4 +from stackit.iaas.models.network_ipv6 import NetworkIPv6 from stackit.iaas.models.network_list_response import NetworkListResponse from stackit.iaas.models.network_range import NetworkRange from stackit.iaas.models.network_range_list_response import NetworkRangeListResponse +from stackit.iaas.models.nexthop_blackhole import NexthopBlackhole +from stackit.iaas.models.nexthop_internet import NexthopInternet +from stackit.iaas.models.nexthop_ipv4 import NexthopIPv4 +from stackit.iaas.models.nexthop_ipv6 import NexthopIPv6 from stackit.iaas.models.nic import NIC from stackit.iaas.models.nic_list_response import NICListResponse from stackit.iaas.models.partial_update_network_area_payload import ( @@ -110,13 +140,20 @@ from stackit.iaas.models.quota import Quota from stackit.iaas.models.quota_list import QuotaList from stackit.iaas.models.quota_list_response import QuotaListResponse +from stackit.iaas.models.regional_area import RegionalArea +from stackit.iaas.models.regional_area_ipv4 import RegionalAreaIPv4 +from stackit.iaas.models.regional_area_list_response import RegionalAreaListResponse from stackit.iaas.models.request import Request from stackit.iaas.models.request_resource import RequestResource from stackit.iaas.models.rescue_server_payload import RescueServerPayload from stackit.iaas.models.resize_server_payload import ResizeServerPayload from stackit.iaas.models.resize_volume_payload import ResizeVolumePayload from stackit.iaas.models.route import Route +from stackit.iaas.models.route_destination import RouteDestination from stackit.iaas.models.route_list_response import RouteListResponse +from stackit.iaas.models.route_nexthop import RouteNexthop +from stackit.iaas.models.routing_table import RoutingTable +from stackit.iaas.models.routing_table_list_response import RoutingTableListResponse from stackit.iaas.models.security_group import SecurityGroup from stackit.iaas.models.security_group_list_response import SecurityGroupListResponse from stackit.iaas.models.security_group_rule import SecurityGroupRule @@ -125,10 +162,12 @@ ) from stackit.iaas.models.security_group_rule_protocol import SecurityGroupRuleProtocol from stackit.iaas.models.server import Server +from stackit.iaas.models.server_agent import ServerAgent from stackit.iaas.models.server_console_url import ServerConsoleUrl from stackit.iaas.models.server_list_response import ServerListResponse from stackit.iaas.models.server_maintenance import ServerMaintenance from stackit.iaas.models.server_network import ServerNetwork +from stackit.iaas.models.server_networking import ServerNetworking from stackit.iaas.models.service_account_mail_list_response import ( ServiceAccountMailListResponse, ) @@ -136,27 +175,47 @@ from stackit.iaas.models.snapshot import Snapshot from stackit.iaas.models.snapshot_list_response import SnapshotListResponse from stackit.iaas.models.static_area_id import StaticAreaID -from stackit.iaas.models.update_area_address_family import UpdateAreaAddressFamily -from stackit.iaas.models.update_area_ipv4 import UpdateAreaIPv4 from stackit.iaas.models.update_attached_volume_payload import ( UpdateAttachedVolumePayload, ) -from stackit.iaas.models.update_backup_payload import UpdateBackupPayload from stackit.iaas.models.update_image_payload import UpdateImagePayload from stackit.iaas.models.update_image_share_payload import UpdateImageSharePayload from stackit.iaas.models.update_key_pair_payload import UpdateKeyPairPayload -from stackit.iaas.models.update_network_address_family import UpdateNetworkAddressFamily -from stackit.iaas.models.update_network_area_route_payload import ( - UpdateNetworkAreaRoutePayload, +from stackit.iaas.models.update_management_network_route_payload import ( + UpdateManagementNetworkRoutePayload, ) from stackit.iaas.models.update_network_ipv4_body import UpdateNetworkIPv4Body from stackit.iaas.models.update_network_ipv6_body import UpdateNetworkIPv6Body from stackit.iaas.models.update_nic_payload import UpdateNicPayload from stackit.iaas.models.update_public_ip_payload import UpdatePublicIPPayload -from stackit.iaas.models.update_security_group_payload import UpdateSecurityGroupPayload +from stackit.iaas.models.update_regional_area_ipv4 import UpdateRegionalAreaIPv4 +from stackit.iaas.models.update_route_of_routing_table_payload import ( + UpdateRouteOfRoutingTablePayload, +) +from stackit.iaas.models.update_routing_table_of_area_payload import ( + UpdateRoutingTableOfAreaPayload, +) from stackit.iaas.models.update_server_payload import UpdateServerPayload -from stackit.iaas.models.update_snapshot_payload import UpdateSnapshotPayload from stackit.iaas.models.update_volume_payload import UpdateVolumePayload +from stackit.iaas.models.v2beta1_configure_network_area_region_payload import ( + V2beta1ConfigureNetworkAreaRegionPayload, +) +from stackit.iaas.models.v2beta1_create_snapshot_payload import ( + V2beta1CreateSnapshotPayload, +) +from stackit.iaas.models.v2beta1_update_backup_payload import V2beta1UpdateBackupPayload +from stackit.iaas.models.v2beta1_update_network_area_region_payload import ( + V2beta1UpdateNetworkAreaRegionPayload, +) +from stackit.iaas.models.v2beta1_update_route_of_area_payload import ( + V2beta1UpdateRouteOfAreaPayload, +) +from stackit.iaas.models.v2beta1_update_security_group_payload import ( + V2beta1UpdateSecurityGroupPayload, +) +from stackit.iaas.models.v2beta1_update_snapshot_payload import ( + V2beta1UpdateSnapshotPayload, +) from stackit.iaas.models.volume import Volume from stackit.iaas.models.volume_attachment import VolumeAttachment from stackit.iaas.models.volume_attachment_list_response import ( diff --git a/services/iaas/src/stackit/iaas/models/add_routes_to_routing_table_payload.py b/services/iaas/src/stackit/iaas/models/add_routes_to_routing_table_payload.py new file mode 100644 index 00000000..f6a7c8c8 --- /dev/null +++ b/services/iaas/src/stackit/iaas/models/add_routes_to_routing_table_payload.py @@ -0,0 +1,93 @@ +# coding: utf-8 + +""" + IaaS-API + + This API allows you to create and modify IaaS resources. + + The version of the OpenAPI document: 2beta1 + Contact: stackit-iaas@mail.schwarz + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +from __future__ import annotations + +import json +import pprint +from typing import Any, ClassVar, Dict, List, Optional, Set + +from pydantic import BaseModel, ConfigDict, Field +from typing_extensions import Self + +from stackit.iaas.models.route import Route + + +class AddRoutesToRoutingTablePayload(BaseModel): + """ + Object represents a request to add network routes. + """ # noqa: E501 + + items: List[Route] = Field(description="A list of routes.") + __properties: ClassVar[List[str]] = ["items"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AddRoutesToRoutingTablePayload from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in items (list) + _items = [] + if self.items: + for _item in self.items: + if _item: + _items.append(_item.to_dict()) + _dict["items"] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AddRoutesToRoutingTablePayload from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + {"items": [Route.from_dict(_item) for _item in obj["items"]] if obj.get("items") is not None else None} + ) + return _obj diff --git a/services/iaas/src/stackit/iaas/models/add_routing_table_to_area_payload.py b/services/iaas/src/stackit/iaas/models/add_routing_table_to_area_payload.py new file mode 100644 index 00000000..b71ca18c --- /dev/null +++ b/services/iaas/src/stackit/iaas/models/add_routing_table_to_area_payload.py @@ -0,0 +1,157 @@ +# coding: utf-8 + +""" + IaaS-API + + This API allows you to create and modify IaaS resources. + + The version of the OpenAPI document: 2beta1 + Contact: stackit-iaas@mail.schwarz + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from datetime import datetime +from typing import Any, ClassVar, Dict, List, Optional, Set + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, field_validator +from typing_extensions import Annotated, Self + + +class AddRoutingTableToAreaPayload(BaseModel): + """ + An object representing a routing table. + """ # noqa: E501 + + created_at: Optional[datetime] = Field( + default=None, description="Date-time when resource was created.", alias="createdAt" + ) + default: Optional[StrictBool] = Field( + default=True, + description="This is the default routing table. It can't be deleted and is used if the user does not specify it otherwise.", + ) + description: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field( + default=None, description="Description Object. Allows string up to 255 Characters." + ) + id: Optional[Annotated[str, Field(min_length=36, strict=True, max_length=36)]] = Field( + default=None, description="Universally Unique Identifier (UUID)." + ) + labels: Optional[Dict[str, Any]] = Field( + default=None, + description="Object that represents the labels of an object. Regex for keys: `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a `null` value for a key will remove that key.", + ) + name: Annotated[str, Field(strict=True, max_length=127)] = Field( + description="The name for a General Object. Matches Names and also UUIDs." + ) + system_routes: Optional[StrictBool] = Field(default=True, alias="systemRoutes") + updated_at: Optional[datetime] = Field( + default=None, description="Date-time when resource was last updated.", alias="updatedAt" + ) + __properties: ClassVar[List[str]] = [ + "createdAt", + "default", + "description", + "id", + "labels", + "name", + "systemRoutes", + "updatedAt", + ] + + @field_validator("id") + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$", value): + raise ValueError( + r"must validate the regular expression /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/" + ) + return value + + @field_validator("name") + def name_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^[A-Za-z0-9]+([ \/._-]*[A-Za-z0-9]+)*$", value): + raise ValueError(r"must validate the regular expression /^[A-Za-z0-9]+([ \/._-]*[A-Za-z0-9]+)*$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AddRoutingTableToAreaPayload from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + """ + excluded_fields: Set[str] = set( + [ + "created_at", + "default", + "id", + "updated_at", + ] + ) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AddRoutingTableToAreaPayload from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "createdAt": obj.get("createdAt"), + "default": obj.get("default") if obj.get("default") is not None else True, + "description": obj.get("description"), + "id": obj.get("id"), + "labels": obj.get("labels"), + "name": obj.get("name"), + "systemRoutes": obj.get("systemRoutes") if obj.get("systemRoutes") is not None else True, + "updatedAt": obj.get("updatedAt"), + } + ) + return _obj diff --git a/services/iaas/src/stackit/iaas/models/add_volume_to_server_payload.py b/services/iaas/src/stackit/iaas/models/add_volume_to_server_payload.py index 93557c14..d7c0e098 100644 --- a/services/iaas/src/stackit/iaas/models/add_volume_to_server_payload.py +++ b/services/iaas/src/stackit/iaas/models/add_volume_to_server_payload.py @@ -5,7 +5,7 @@ This API allows you to create and modify IaaS resources. - The version of the OpenAPI document: 1 + The version of the OpenAPI document: 2beta1 Contact: stackit-iaas@mail.schwarz Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/services/iaas/src/stackit/iaas/models/affinity_group.py b/services/iaas/src/stackit/iaas/models/affinity_group.py index 011bc650..bb3f2d44 100644 --- a/services/iaas/src/stackit/iaas/models/affinity_group.py +++ b/services/iaas/src/stackit/iaas/models/affinity_group.py @@ -5,7 +5,7 @@ This API allows you to create and modify IaaS resources. - The version of the OpenAPI document: 1 + The version of the OpenAPI document: 2beta1 Contact: stackit-iaas@mail.schwarz Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/services/iaas/src/stackit/iaas/models/affinity_group_list_response.py b/services/iaas/src/stackit/iaas/models/affinity_group_list_response.py index 5d4333ce..16184637 100644 --- a/services/iaas/src/stackit/iaas/models/affinity_group_list_response.py +++ b/services/iaas/src/stackit/iaas/models/affinity_group_list_response.py @@ -5,7 +5,7 @@ This API allows you to create and modify IaaS resources. - The version of the OpenAPI document: 1 + The version of the OpenAPI document: 2beta1 Contact: stackit-iaas@mail.schwarz Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/services/iaas/src/stackit/iaas/models/allowed_addresses_inner.py b/services/iaas/src/stackit/iaas/models/allowed_addresses_inner.py index 715e1aac..a3ac29a5 100644 --- a/services/iaas/src/stackit/iaas/models/allowed_addresses_inner.py +++ b/services/iaas/src/stackit/iaas/models/allowed_addresses_inner.py @@ -5,7 +5,7 @@ This API allows you to create and modify IaaS resources. - The version of the OpenAPI document: 1 + The version of the OpenAPI document: 2beta1 Contact: stackit-iaas@mail.schwarz Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/services/iaas/src/stackit/iaas/models/area_id.py b/services/iaas/src/stackit/iaas/models/area_id.py index 66e16f99..7e6553c1 100644 --- a/services/iaas/src/stackit/iaas/models/area_id.py +++ b/services/iaas/src/stackit/iaas/models/area_id.py @@ -5,7 +5,7 @@ This API allows you to create and modify IaaS resources. - The version of the OpenAPI document: 1 + The version of the OpenAPI document: 2beta1 Contact: stackit-iaas@mail.schwarz Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/services/iaas/src/stackit/iaas/models/availability_zone_list_response.py b/services/iaas/src/stackit/iaas/models/availability_zone_list_response.py index def9818c..694ac9b4 100644 --- a/services/iaas/src/stackit/iaas/models/availability_zone_list_response.py +++ b/services/iaas/src/stackit/iaas/models/availability_zone_list_response.py @@ -5,7 +5,7 @@ This API allows you to create and modify IaaS resources. - The version of the OpenAPI document: 1 + The version of the OpenAPI document: 2beta1 Contact: stackit-iaas@mail.schwarz Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/services/iaas/src/stackit/iaas/models/backup.py b/services/iaas/src/stackit/iaas/models/backup.py index 17de0cb3..5c1192e3 100644 --- a/services/iaas/src/stackit/iaas/models/backup.py +++ b/services/iaas/src/stackit/iaas/models/backup.py @@ -5,7 +5,7 @@ This API allows you to create and modify IaaS resources. - The version of the OpenAPI document: 1 + The version of the OpenAPI document: 2beta1 Contact: stackit-iaas@mail.schwarz Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -40,7 +40,7 @@ class Backup(BaseModel): ) labels: Optional[Dict[str, Any]] = Field( default=None, - description="Object that represents the labels of an object. Regex for keys: `^[a-z]((-|_|[a-z0-9])){0,62}$`. Regex for values: `^(-|_|[a-z0-9]){0,63}$`. Providing a `null` value for a key will remove that key.", + description="Object that represents the labels of an object. Regex for keys: `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a `null` value for a key will remove that key.", ) name: Optional[Annotated[str, Field(strict=True, max_length=127)]] = Field( default=None, description="The name for a General Object. Matches Names and also UUIDs." diff --git a/services/iaas/src/stackit/iaas/models/backup_list_response.py b/services/iaas/src/stackit/iaas/models/backup_list_response.py index 2db8eb0c..7cf3302a 100644 --- a/services/iaas/src/stackit/iaas/models/backup_list_response.py +++ b/services/iaas/src/stackit/iaas/models/backup_list_response.py @@ -5,7 +5,7 @@ This API allows you to create and modify IaaS resources. - The version of the OpenAPI document: 1 + The version of the OpenAPI document: 2beta1 Contact: stackit-iaas@mail.schwarz Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/services/iaas/src/stackit/iaas/models/backup_source.py b/services/iaas/src/stackit/iaas/models/backup_source.py index 849b9286..29561a62 100644 --- a/services/iaas/src/stackit/iaas/models/backup_source.py +++ b/services/iaas/src/stackit/iaas/models/backup_source.py @@ -5,7 +5,7 @@ This API allows you to create and modify IaaS resources. - The version of the OpenAPI document: 1 + The version of the OpenAPI document: 2beta1 Contact: stackit-iaas@mail.schwarz Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/services/iaas/src/stackit/iaas/models/base_security_group_rule.py b/services/iaas/src/stackit/iaas/models/base_security_group_rule.py index 4e4fa087..9fbad1d1 100644 --- a/services/iaas/src/stackit/iaas/models/base_security_group_rule.py +++ b/services/iaas/src/stackit/iaas/models/base_security_group_rule.py @@ -5,7 +5,7 @@ This API allows you to create and modify IaaS resources. - The version of the OpenAPI document: 1 + The version of the OpenAPI document: 2beta1 Contact: stackit-iaas@mail.schwarz Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -17,6 +17,7 @@ import json import pprint import re # noqa: F401 +from datetime import datetime from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator @@ -31,6 +32,9 @@ class BaseSecurityGroupRule(BaseModel): The base schema for a security group rule. """ # noqa: E501 + created_at: Optional[datetime] = Field( + default=None, description="Date-time when resource was created.", alias="createdAt" + ) description: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field( default=None, description="Description Object. Allows string up to 255 Characters." ) @@ -56,7 +60,11 @@ class BaseSecurityGroupRule(BaseModel): security_group_id: Optional[Annotated[str, Field(min_length=36, strict=True, max_length=36)]] = Field( default=None, description="Universally Unique Identifier (UUID).", alias="securityGroupId" ) + updated_at: Optional[datetime] = Field( + default=None, description="Date-time when resource was last updated.", alias="updatedAt" + ) __properties: ClassVar[List[str]] = [ + "createdAt", "description", "direction", "ethertype", @@ -66,6 +74,7 @@ class BaseSecurityGroupRule(BaseModel): "portRange", "remoteSecurityGroupId", "securityGroupId", + "updatedAt", ] @field_validator("id") @@ -150,11 +159,15 @@ def to_dict(self) -> Dict[str, Any]: are ignored. * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. """ excluded_fields: Set[str] = set( [ + "created_at", "id", "security_group_id", + "updated_at", ] ) @@ -182,6 +195,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate( { + "createdAt": obj.get("createdAt"), "description": obj.get("description"), "direction": obj.get("direction"), "ethertype": obj.get("ethertype") if obj.get("ethertype") is not None else "IPv4", @@ -193,6 +207,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "portRange": PortRange.from_dict(obj["portRange"]) if obj.get("portRange") is not None else None, "remoteSecurityGroupId": obj.get("remoteSecurityGroupId"), "securityGroupId": obj.get("securityGroupId"), + "updatedAt": obj.get("updatedAt"), } ) return _obj diff --git a/services/iaas/src/stackit/iaas/models/boot_volume.py b/services/iaas/src/stackit/iaas/models/boot_volume.py index 2ab1d10b..a677d970 100644 --- a/services/iaas/src/stackit/iaas/models/boot_volume.py +++ b/services/iaas/src/stackit/iaas/models/boot_volume.py @@ -5,7 +5,7 @@ This API allows you to create and modify IaaS resources. - The version of the OpenAPI document: 1 + The version of the OpenAPI document: 2beta1 Contact: stackit-iaas@mail.schwarz Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/services/iaas/src/stackit/iaas/models/boot_volume_source.py b/services/iaas/src/stackit/iaas/models/boot_volume_source.py index 307445d1..10088891 100644 --- a/services/iaas/src/stackit/iaas/models/boot_volume_source.py +++ b/services/iaas/src/stackit/iaas/models/boot_volume_source.py @@ -5,7 +5,7 @@ This API allows you to create and modify IaaS resources. - The version of the OpenAPI document: 1 + The version of the OpenAPI document: 2beta1 Contact: stackit-iaas@mail.schwarz Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/services/iaas/src/stackit/iaas/models/create_affinity_group_payload.py b/services/iaas/src/stackit/iaas/models/create_affinity_group_payload.py index eefc7d6c..51907217 100644 --- a/services/iaas/src/stackit/iaas/models/create_affinity_group_payload.py +++ b/services/iaas/src/stackit/iaas/models/create_affinity_group_payload.py @@ -5,7 +5,7 @@ This API allows you to create and modify IaaS resources. - The version of the OpenAPI document: 1 + The version of the OpenAPI document: 2beta1 Contact: stackit-iaas@mail.schwarz Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/services/iaas/src/stackit/iaas/models/create_backup_payload.py b/services/iaas/src/stackit/iaas/models/create_backup_payload.py index a2c46328..f4508cde 100644 --- a/services/iaas/src/stackit/iaas/models/create_backup_payload.py +++ b/services/iaas/src/stackit/iaas/models/create_backup_payload.py @@ -5,7 +5,7 @@ This API allows you to create and modify IaaS resources. - The version of the OpenAPI document: 1 + The version of the OpenAPI document: 2beta1 Contact: stackit-iaas@mail.schwarz Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -32,7 +32,7 @@ class CreateBackupPayload(BaseModel): labels: Optional[Dict[str, Any]] = Field( default=None, - description="Object that represents the labels of an object. Regex for keys: `^[a-z]((-|_|[a-z0-9])){0,62}$`. Regex for values: `^(-|_|[a-z0-9]){0,63}$`. Providing a `null` value for a key will remove that key.", + description="Object that represents the labels of an object. Regex for keys: `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a `null` value for a key will remove that key.", ) name: Optional[Annotated[str, Field(strict=True, max_length=127)]] = Field( default=None, description="The name for a General Object. Matches Names and also UUIDs." diff --git a/services/iaas/src/stackit/iaas/models/create_image_payload.py b/services/iaas/src/stackit/iaas/models/create_image_payload.py index 42524a69..29845be8 100644 --- a/services/iaas/src/stackit/iaas/models/create_image_payload.py +++ b/services/iaas/src/stackit/iaas/models/create_image_payload.py @@ -5,7 +5,7 @@ This API allows you to create and modify IaaS resources. - The version of the OpenAPI document: 1 + The version of the OpenAPI document: 2beta1 Contact: stackit-iaas@mail.schwarz Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -55,7 +55,7 @@ class CreateImagePayload(BaseModel): ) labels: Optional[Dict[str, Any]] = Field( default=None, - description="Object that represents the labels of an object. Regex for keys: `^[a-z]((-|_|[a-z0-9])){0,62}$`. Regex for values: `^(-|_|[a-z0-9]){0,63}$`. Providing a `null` value for a key will remove that key.", + description="Object that represents the labels of an object. Regex for keys: `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a `null` value for a key will remove that key.", ) min_disk_size: Optional[StrictInt] = Field(default=None, description="Size in Gigabyte.", alias="minDiskSize") min_ram: Optional[StrictInt] = Field(default=None, description="Size in Megabyte.", alias="minRam") diff --git a/services/iaas/src/stackit/iaas/models/create_key_pair_payload.py b/services/iaas/src/stackit/iaas/models/create_key_pair_payload.py index 8ab59129..95069fbb 100644 --- a/services/iaas/src/stackit/iaas/models/create_key_pair_payload.py +++ b/services/iaas/src/stackit/iaas/models/create_key_pair_payload.py @@ -5,7 +5,7 @@ This API allows you to create and modify IaaS resources. - The version of the OpenAPI document: 1 + The version of the OpenAPI document: 2beta1 Contact: stackit-iaas@mail.schwarz Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -37,7 +37,7 @@ class CreateKeyPairPayload(BaseModel): ) labels: Optional[Dict[str, Any]] = Field( default=None, - description="Object that represents the labels of an object. Regex for keys: `^[a-z]((-|_|[a-z0-9])){0,62}$`. Regex for values: `^(-|_|[a-z0-9]){0,63}$`. Providing a `null` value for a key will remove that key.", + description="Object that represents the labels of an object. Regex for keys: `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a `null` value for a key will remove that key.", ) name: Optional[Annotated[str, Field(strict=True, max_length=127)]] = Field( default=None, diff --git a/services/iaas/src/stackit/iaas/models/create_management_network_payload.py b/services/iaas/src/stackit/iaas/models/create_management_network_payload.py new file mode 100644 index 00000000..9323a0bd --- /dev/null +++ b/services/iaas/src/stackit/iaas/models/create_management_network_payload.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + IaaS-API + + This API allows you to create and modify IaaS resources. + + The version of the OpenAPI document: 2beta1 + Contact: stackit-iaas@mail.schwarz + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from typing import Any, ClassVar, Dict, List, Optional, Set + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing_extensions import Annotated, Self + + +class CreateManagementNetworkPayload(BaseModel): + """ + Object that represents the request body for a mgmt network create. + """ # noqa: E501 + + ipv6_assignment: Optional[StrictStr] = Field( + default=None, + description="IPv6 assignment method; either 'dhcp' for stateful dhcpv6, or slaac for autoconfig. Possible values: `dhcp`, `slaac`.", + alias="ipv6Assignment", + ) + name: Annotated[str, Field(strict=True, max_length=127)] = Field( + description="The name for a General Object. Matches Names and also UUIDs." + ) + __properties: ClassVar[List[str]] = ["ipv6Assignment", "name"] + + @field_validator("name") + def name_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^[A-Za-z0-9]+([ \/._-]*[A-Za-z0-9]+)*$", value): + raise ValueError(r"must validate the regular expression /^[A-Za-z0-9]+([ \/._-]*[A-Za-z0-9]+)*$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CreateManagementNetworkPayload from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CreateManagementNetworkPayload from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({"ipv6Assignment": obj.get("ipv6Assignment"), "name": obj.get("name")}) + return _obj diff --git a/services/iaas/src/stackit/iaas/models/create_management_network_route_payload.py b/services/iaas/src/stackit/iaas/models/create_management_network_route_payload.py new file mode 100644 index 00000000..b466b0d5 --- /dev/null +++ b/services/iaas/src/stackit/iaas/models/create_management_network_route_payload.py @@ -0,0 +1,99 @@ +# coding: utf-8 + +""" + IaaS-API + + This API allows you to create and modify IaaS resources. + + The version of the OpenAPI document: 2beta1 + Contact: stackit-iaas@mail.schwarz + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +from __future__ import annotations + +import json +import pprint +from typing import Any, ClassVar, Dict, List, Optional, Set + +from pydantic import BaseModel, ConfigDict, Field +from typing_extensions import Self + +from stackit.iaas.models.management_route import ManagementRoute + + +class CreateManagementNetworkRoutePayload(BaseModel): + """ + Object represents a request to add management network routes. + """ # noqa: E501 + + items: List[ManagementRoute] = Field(description="A list of management routes.") + __properties: ClassVar[List[str]] = ["items"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CreateManagementNetworkRoutePayload from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in items (list) + _items = [] + if self.items: + for _item in self.items: + if _item: + _items.append(_item.to_dict()) + _dict["items"] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CreateManagementNetworkRoutePayload from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "items": ( + [ManagementRoute.from_dict(_item) for _item in obj["items"]] + if obj.get("items") is not None + else None + ) + } + ) + return _obj diff --git a/services/iaas/src/stackit/iaas/models/create_network_area_payload.py b/services/iaas/src/stackit/iaas/models/create_network_area_payload.py index 801306c0..e573ea62 100644 --- a/services/iaas/src/stackit/iaas/models/create_network_area_payload.py +++ b/services/iaas/src/stackit/iaas/models/create_network_area_payload.py @@ -5,7 +5,7 @@ This API allows you to create and modify IaaS resources. - The version of the OpenAPI document: 1 + The version of the OpenAPI document: 2beta1 Contact: stackit-iaas@mail.schwarz Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -16,36 +16,23 @@ import json import pprint -import re # noqa: F401 from typing import Any, ClassVar, Dict, List, Optional, Set -from pydantic import BaseModel, ConfigDict, Field, field_validator -from typing_extensions import Annotated, Self - -from stackit.iaas.models.create_area_address_family import CreateAreaAddressFamily +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing_extensions import Self class CreateNetworkAreaPayload(BaseModel): """ - CreateNetworkAreaPayload + Object that represents the network area create request. """ # noqa: E501 - address_family: CreateAreaAddressFamily = Field(alias="addressFamily") labels: Optional[Dict[str, Any]] = Field( default=None, - description="Object that represents the labels of an object. Regex for keys: `^[a-z]((-|_|[a-z0-9])){0,62}$`. Regex for values: `^(-|_|[a-z0-9]){0,63}$`. Providing a `null` value for a key will remove that key.", - ) - name: Annotated[str, Field(strict=True, max_length=127)] = Field( - description="The name for a General Object. Matches Names and also UUIDs." + description="Object that represents the labels of an object. Regex for keys: `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a `null` value for a key will remove that key.", ) - __properties: ClassVar[List[str]] = ["addressFamily", "labels", "name"] - - @field_validator("name") - def name_validate_regular_expression(cls, value): - """Validates the regular expression""" - if not re.match(r"^[A-Za-z0-9]+([ \/._-]*[A-Za-z0-9]+)*$", value): - raise ValueError(r"must validate the regular expression /^[A-Za-z0-9]+([ \/._-]*[A-Za-z0-9]+)*$/") - return value + name: StrictStr + __properties: ClassVar[List[str]] = ["labels", "name"] model_config = ConfigDict( populate_by_name=True, @@ -84,9 +71,6 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) - # override the default output from pydantic by calling `to_dict()` of address_family - if self.address_family: - _dict["addressFamily"] = self.address_family.to_dict() return _dict @classmethod @@ -98,15 +82,5 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "addressFamily": ( - CreateAreaAddressFamily.from_dict(obj["addressFamily"]) - if obj.get("addressFamily") is not None - else None - ), - "labels": obj.get("labels"), - "name": obj.get("name"), - } - ) + _obj = cls.model_validate({"labels": obj.get("labels"), "name": obj.get("name")}) return _obj diff --git a/services/iaas/src/stackit/iaas/models/create_network_area_range_payload.py b/services/iaas/src/stackit/iaas/models/create_network_area_range_payload.py index 3ee176bb..d68b61f0 100644 --- a/services/iaas/src/stackit/iaas/models/create_network_area_range_payload.py +++ b/services/iaas/src/stackit/iaas/models/create_network_area_range_payload.py @@ -5,7 +5,7 @@ This API allows you to create and modify IaaS resources. - The version of the OpenAPI document: 1 + The version of the OpenAPI document: 2beta1 Contact: stackit-iaas@mail.schwarz Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/services/iaas/src/stackit/iaas/models/create_network_area_route_payload.py b/services/iaas/src/stackit/iaas/models/create_network_area_route_payload.py index 98ac069a..98ddf45d 100644 --- a/services/iaas/src/stackit/iaas/models/create_network_area_route_payload.py +++ b/services/iaas/src/stackit/iaas/models/create_network_area_route_payload.py @@ -5,7 +5,7 @@ This API allows you to create and modify IaaS resources. - The version of the OpenAPI document: 1 + The version of the OpenAPI document: 2beta1 Contact: stackit-iaas@mail.schwarz Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -26,11 +26,11 @@ class CreateNetworkAreaRoutePayload(BaseModel): """ - CreateNetworkAreaRoutePayload + Object represents a request to add network routes. """ # noqa: E501 - ipv4: Optional[List[Route]] = Field(default=None, description="A list of routes.") - __properties: ClassVar[List[str]] = ["ipv4"] + items: List[Route] = Field(description="A list of routes.") + __properties: ClassVar[List[str]] = ["items"] model_config = ConfigDict( populate_by_name=True, @@ -69,13 +69,13 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) - # override the default output from pydantic by calling `to_dict()` of each item in ipv4 (list) + # override the default output from pydantic by calling `to_dict()` of each item in items (list) _items = [] - if self.ipv4: - for _item in self.ipv4: + if self.items: + for _item in self.items: if _item: _items.append(_item.to_dict()) - _dict["ipv4"] = _items + _dict["items"] = _items return _dict @classmethod @@ -88,6 +88,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate( - {"ipv4": [Route.from_dict(_item) for _item in obj["ipv4"]] if obj.get("ipv4") is not None else None} + {"items": [Route.from_dict(_item) for _item in obj["items"]] if obj.get("items") is not None else None} ) return _obj diff --git a/services/iaas/src/stackit/iaas/models/create_network_ipv4.py b/services/iaas/src/stackit/iaas/models/create_network_ipv4.py new file mode 100644 index 00000000..cf30b8d5 --- /dev/null +++ b/services/iaas/src/stackit/iaas/models/create_network_ipv4.py @@ -0,0 +1,155 @@ +# coding: utf-8 + +""" + IaaS-API + + This API allows you to create and modify IaaS resources. + + The version of the OpenAPI document: 2beta1 + Contact: stackit-iaas@mail.schwarz + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +from __future__ import annotations + +import json +import pprint +from typing import Any, Dict, Optional, Set, Union + +from pydantic import ( + BaseModel, + ConfigDict, + ValidationError, + field_validator, +) +from typing_extensions import Self + +from stackit.iaas.models.create_network_ipv4_with_prefix import ( + CreateNetworkIPv4WithPrefix, +) +from stackit.iaas.models.create_network_ipv4_with_prefix_length import ( + CreateNetworkIPv4WithPrefixLength, +) + + +CREATENETWORKIPV4_ONE_OF_SCHEMAS = ["CreateNetworkIPv4WithPrefix", "CreateNetworkIPv4WithPrefixLength"] + + +class CreateNetworkIPv4(BaseModel): + """ + The create request for an IPv4 network. + """ + + # data type: CreateNetworkIPv4WithPrefix + oneof_schema_1_validator: Optional[CreateNetworkIPv4WithPrefix] = None + # data type: CreateNetworkIPv4WithPrefixLength + oneof_schema_2_validator: Optional[CreateNetworkIPv4WithPrefixLength] = None + actual_instance: Optional[Union[CreateNetworkIPv4WithPrefix, CreateNetworkIPv4WithPrefixLength]] = None + one_of_schemas: Set[str] = {"CreateNetworkIPv4WithPrefix", "CreateNetworkIPv4WithPrefixLength"} + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator("actual_instance") + def actual_instance_must_validate_oneof(cls, v): + instance = CreateNetworkIPv4.model_construct() + error_messages = [] + match = 0 + # validate data type: CreateNetworkIPv4WithPrefix + if not isinstance(v, CreateNetworkIPv4WithPrefix): + error_messages.append(f"Error! Input type `{type(v)}` is not `CreateNetworkIPv4WithPrefix`") + else: + match += 1 + # validate data type: CreateNetworkIPv4WithPrefixLength + if not isinstance(v, CreateNetworkIPv4WithPrefixLength): + error_messages.append(f"Error! Input type `{type(v)}` is not `CreateNetworkIPv4WithPrefixLength`") + else: + match += 1 + if match == 0: + # no match + raise ValueError( + "No match found when setting `actual_instance` in CreateNetworkIPv4 with oneOf schemas: CreateNetworkIPv4WithPrefix, CreateNetworkIPv4WithPrefixLength. Details: " + + ", ".join(error_messages) + ) + else: + return v + + @classmethod + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # deserialize data into CreateNetworkIPv4WithPrefix + try: + instance.actual_instance = CreateNetworkIPv4WithPrefix.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into CreateNetworkIPv4WithPrefixLength + try: + instance.actual_instance = CreateNetworkIPv4WithPrefixLength.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError( + "Multiple matches found when deserializing the JSON string into CreateNetworkIPv4 with oneOf schemas: CreateNetworkIPv4WithPrefix, CreateNetworkIPv4WithPrefixLength. Details: " + + ", ".join(error_messages) + ) + elif match == 0: + # no match + raise ValueError( + "No match found when deserializing the JSON string into CreateNetworkIPv4 with oneOf schemas: CreateNetworkIPv4WithPrefix, CreateNetworkIPv4WithPrefixLength. Details: " + + ", ".join(error_messages) + ) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict( + self, + ) -> Optional[Union[Dict[str, Any], CreateNetworkIPv4WithPrefix, CreateNetworkIPv4WithPrefixLength]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) diff --git a/services/iaas/src/stackit/iaas/models/create_network_ipv4_with_prefix.py b/services/iaas/src/stackit/iaas/models/create_network_ipv4_with_prefix.py new file mode 100644 index 00000000..ad148a32 --- /dev/null +++ b/services/iaas/src/stackit/iaas/models/create_network_ipv4_with_prefix.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + IaaS-API + + This API allows you to create and modify IaaS resources. + + The version of the OpenAPI document: 2beta1 + Contact: stackit-iaas@mail.schwarz + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from typing import Any, ClassVar, Dict, List, Optional, Set + +from pydantic import BaseModel, ConfigDict, Field, field_validator +from typing_extensions import Annotated, Self + + +class CreateNetworkIPv4WithPrefix(BaseModel): + """ + The create request for an IPv4 network with a specified prefix. + """ # noqa: E501 + + gateway: Optional[Annotated[str, Field(strict=True)]] = Field( + default=None, + description="The IPv4 gateway of a network. If not specified the first IP of the network will be assigned as the gateway. If 'null' is sent, then the network doesn't have a gateway.", + ) + nameservers: Optional[Annotated[List[Annotated[str, Field(strict=True)]], Field(max_length=3)]] = Field( + default=None, description="A list containing DNS Servers/Nameservers for IPv4." + ) + prefix: Annotated[str, Field(strict=True)] = Field(description="IPv4 Classless Inter-Domain Routing (CIDR).") + __properties: ClassVar[List[str]] = ["gateway", "nameservers", "prefix"] + + @field_validator("gateway") + def gateway_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match( + r"^\s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))\s*$", + value, + ): + raise ValueError( + r"must validate the regular expression /^\s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))\s*$/" + ) + return value + + @field_validator("prefix") + def prefix_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match( + r"^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(\/(3[0-2]|2[0-9]|1[0-9]|[0-9]))$", + value, + ): + raise ValueError( + r"must validate the regular expression /^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(\/(3[0-2]|2[0-9]|1[0-9]|[0-9]))$/" + ) + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CreateNetworkIPv4WithPrefix from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if gateway (nullable) is None + # and model_fields_set contains the field + if self.gateway is None and "gateway" in self.model_fields_set: + _dict["gateway"] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CreateNetworkIPv4WithPrefix from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + {"gateway": obj.get("gateway"), "nameservers": obj.get("nameservers"), "prefix": obj.get("prefix")} + ) + return _obj diff --git a/services/iaas/src/stackit/iaas/models/create_network_ipv4_with_prefix_length.py b/services/iaas/src/stackit/iaas/models/create_network_ipv4_with_prefix_length.py new file mode 100644 index 00000000..8d470bd2 --- /dev/null +++ b/services/iaas/src/stackit/iaas/models/create_network_ipv4_with_prefix_length.py @@ -0,0 +1,85 @@ +# coding: utf-8 + +""" + IaaS-API + + This API allows you to create and modify IaaS resources. + + The version of the OpenAPI document: 2beta1 + Contact: stackit-iaas@mail.schwarz + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +from __future__ import annotations + +import json +import pprint +from typing import Any, ClassVar, Dict, List, Optional, Set + +from pydantic import BaseModel, ConfigDict, Field +from typing_extensions import Annotated, Self + + +class CreateNetworkIPv4WithPrefixLength(BaseModel): + """ + The create request for an IPv4 network with a wanted prefix length. + """ # noqa: E501 + + nameservers: Optional[Annotated[List[Annotated[str, Field(strict=True)]], Field(max_length=3)]] = Field( + default=None, description="A list containing DNS Servers/Nameservers for IPv4." + ) + prefix_length: Annotated[int, Field(le=29, strict=True, ge=8)] = Field(alias="prefixLength") + __properties: ClassVar[List[str]] = ["nameservers", "prefixLength"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CreateNetworkIPv4WithPrefixLength from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CreateNetworkIPv4WithPrefixLength from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({"nameservers": obj.get("nameservers"), "prefixLength": obj.get("prefixLength")}) + return _obj diff --git a/services/iaas/src/stackit/iaas/models/create_network_ipv6.py b/services/iaas/src/stackit/iaas/models/create_network_ipv6.py new file mode 100644 index 00000000..004f30fc --- /dev/null +++ b/services/iaas/src/stackit/iaas/models/create_network_ipv6.py @@ -0,0 +1,155 @@ +# coding: utf-8 + +""" + IaaS-API + + This API allows you to create and modify IaaS resources. + + The version of the OpenAPI document: 2beta1 + Contact: stackit-iaas@mail.schwarz + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +from __future__ import annotations + +import json +import pprint +from typing import Any, Dict, Optional, Set, Union + +from pydantic import ( + BaseModel, + ConfigDict, + ValidationError, + field_validator, +) +from typing_extensions import Self + +from stackit.iaas.models.create_network_ipv6_with_prefix import ( + CreateNetworkIPv6WithPrefix, +) +from stackit.iaas.models.create_network_ipv6_with_prefix_length import ( + CreateNetworkIPv6WithPrefixLength, +) + + +CREATENETWORKIPV6_ONE_OF_SCHEMAS = ["CreateNetworkIPv6WithPrefix", "CreateNetworkIPv6WithPrefixLength"] + + +class CreateNetworkIPv6(BaseModel): + """ + The create request for an IPv6 network. + """ + + # data type: CreateNetworkIPv6WithPrefix + oneof_schema_1_validator: Optional[CreateNetworkIPv6WithPrefix] = None + # data type: CreateNetworkIPv6WithPrefixLength + oneof_schema_2_validator: Optional[CreateNetworkIPv6WithPrefixLength] = None + actual_instance: Optional[Union[CreateNetworkIPv6WithPrefix, CreateNetworkIPv6WithPrefixLength]] = None + one_of_schemas: Set[str] = {"CreateNetworkIPv6WithPrefix", "CreateNetworkIPv6WithPrefixLength"} + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator("actual_instance") + def actual_instance_must_validate_oneof(cls, v): + instance = CreateNetworkIPv6.model_construct() + error_messages = [] + match = 0 + # validate data type: CreateNetworkIPv6WithPrefix + if not isinstance(v, CreateNetworkIPv6WithPrefix): + error_messages.append(f"Error! Input type `{type(v)}` is not `CreateNetworkIPv6WithPrefix`") + else: + match += 1 + # validate data type: CreateNetworkIPv6WithPrefixLength + if not isinstance(v, CreateNetworkIPv6WithPrefixLength): + error_messages.append(f"Error! Input type `{type(v)}` is not `CreateNetworkIPv6WithPrefixLength`") + else: + match += 1 + if match == 0: + # no match + raise ValueError( + "No match found when setting `actual_instance` in CreateNetworkIPv6 with oneOf schemas: CreateNetworkIPv6WithPrefix, CreateNetworkIPv6WithPrefixLength. Details: " + + ", ".join(error_messages) + ) + else: + return v + + @classmethod + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # deserialize data into CreateNetworkIPv6WithPrefix + try: + instance.actual_instance = CreateNetworkIPv6WithPrefix.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into CreateNetworkIPv6WithPrefixLength + try: + instance.actual_instance = CreateNetworkIPv6WithPrefixLength.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError( + "Multiple matches found when deserializing the JSON string into CreateNetworkIPv6 with oneOf schemas: CreateNetworkIPv6WithPrefix, CreateNetworkIPv6WithPrefixLength. Details: " + + ", ".join(error_messages) + ) + elif match == 0: + # no match + raise ValueError( + "No match found when deserializing the JSON string into CreateNetworkIPv6 with oneOf schemas: CreateNetworkIPv6WithPrefix, CreateNetworkIPv6WithPrefixLength. Details: " + + ", ".join(error_messages) + ) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict( + self, + ) -> Optional[Union[Dict[str, Any], CreateNetworkIPv6WithPrefix, CreateNetworkIPv6WithPrefixLength]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) diff --git a/services/iaas/src/stackit/iaas/models/create_network_ipv6_with_prefix.py b/services/iaas/src/stackit/iaas/models/create_network_ipv6_with_prefix.py new file mode 100644 index 00000000..b27c3e3c --- /dev/null +++ b/services/iaas/src/stackit/iaas/models/create_network_ipv6_with_prefix.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +""" + IaaS-API + + This API allows you to create and modify IaaS resources. + + The version of the OpenAPI document: 2beta1 + Contact: stackit-iaas@mail.schwarz + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from typing import Any, ClassVar, Dict, List, Optional, Set + +from pydantic import BaseModel, ConfigDict, Field, field_validator +from typing_extensions import Annotated, Self + + +class CreateNetworkIPv6WithPrefix(BaseModel): + """ + The create request for an IPv6 network with a specified prefix. + """ # noqa: E501 + + gateway: Optional[Annotated[str, Field(strict=True)]] = Field( + default=None, + description="The IPv6 gateway of a network. If not specified the first IP of the network will be assigned as the gateway. If 'null' is sent, then the network doesn't have a gateway.", + ) + nameservers: Optional[Annotated[List[Annotated[str, Field(strict=True)]], Field(max_length=3)]] = Field( + default=None, description="A list containing DNS Servers/Nameservers for IPv6." + ) + prefix: Annotated[str, Field(strict=True)] = Field(description="Classless Inter-Domain Routing (CIDR) for IPv6.") + __properties: ClassVar[List[str]] = ["gateway", "nameservers", "prefix"] + + @field_validator("gateway") + def gateway_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match( + r"^\s*((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$", + value, + ): + raise ValueError( + r"must validate the regular expression /^\s*((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$/" + ) + return value + + @field_validator("prefix") + def prefix_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match( + r"^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))(\/((1(1[0-9]|2[0-8]))|([0-9][0-9])|([0-9])))?$", + value, + ): + raise ValueError( + r"must validate the regular expression /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))(\/((1(1[0-9]|2[0-8]))|([0-9][0-9])|([0-9])))?$/" + ) + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CreateNetworkIPv6WithPrefix from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if gateway (nullable) is None + # and model_fields_set contains the field + if self.gateway is None and "gateway" in self.model_fields_set: + _dict["gateway"] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CreateNetworkIPv6WithPrefix from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + {"gateway": obj.get("gateway"), "nameservers": obj.get("nameservers"), "prefix": obj.get("prefix")} + ) + return _obj diff --git a/services/iaas/src/stackit/iaas/models/create_network_ipv6_with_prefix_length.py b/services/iaas/src/stackit/iaas/models/create_network_ipv6_with_prefix_length.py new file mode 100644 index 00000000..48a3811e --- /dev/null +++ b/services/iaas/src/stackit/iaas/models/create_network_ipv6_with_prefix_length.py @@ -0,0 +1,85 @@ +# coding: utf-8 + +""" + IaaS-API + + This API allows you to create and modify IaaS resources. + + The version of the OpenAPI document: 2beta1 + Contact: stackit-iaas@mail.schwarz + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +from __future__ import annotations + +import json +import pprint +from typing import Any, ClassVar, Dict, List, Optional, Set + +from pydantic import BaseModel, ConfigDict, Field +from typing_extensions import Annotated, Self + + +class CreateNetworkIPv6WithPrefixLength(BaseModel): + """ + The create request for an IPv6 network with a wanted prefix length. + """ # noqa: E501 + + nameservers: Optional[Annotated[List[Annotated[str, Field(strict=True)]], Field(max_length=3)]] = Field( + default=None, description="A list containing DNS Servers/Nameservers for IPv6." + ) + prefix_length: Annotated[int, Field(le=128, strict=True, ge=56)] = Field(alias="prefixLength") + __properties: ClassVar[List[str]] = ["nameservers", "prefixLength"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CreateNetworkIPv6WithPrefixLength from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CreateNetworkIPv6WithPrefixLength from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({"nameservers": obj.get("nameservers"), "prefixLength": obj.get("prefixLength")}) + return _obj diff --git a/services/iaas/src/stackit/iaas/models/create_network_payload.py b/services/iaas/src/stackit/iaas/models/create_network_payload.py index 028b4e64..3d8eac76 100644 --- a/services/iaas/src/stackit/iaas/models/create_network_payload.py +++ b/services/iaas/src/stackit/iaas/models/create_network_payload.py @@ -5,7 +5,7 @@ This API allows you to create and modify IaaS resources. - The version of the OpenAPI document: 1 + The version of the OpenAPI document: 2beta1 Contact: stackit-iaas@mail.schwarz Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -22,7 +22,8 @@ from pydantic import BaseModel, ConfigDict, Field, StrictBool, field_validator from typing_extensions import Annotated, Self -from stackit.iaas.models.create_network_address_family import CreateNetworkAddressFamily +from stackit.iaas.models.create_network_ipv4 import CreateNetworkIPv4 +from stackit.iaas.models.create_network_ipv6 import CreateNetworkIPv6 class CreateNetworkPayload(BaseModel): @@ -30,11 +31,12 @@ class CreateNetworkPayload(BaseModel): Object that represents the request body for a network create. """ # noqa: E501 - address_family: Optional[CreateNetworkAddressFamily] = Field(default=None, alias="addressFamily") dhcp: Optional[StrictBool] = Field(default=None, description="Enable or disable DHCP for a network.") + ipv4: Optional[CreateNetworkIPv4] = None + ipv6: Optional[CreateNetworkIPv6] = None labels: Optional[Dict[str, Any]] = Field( default=None, - description="Object that represents the labels of an object. Regex for keys: `^[a-z]((-|_|[a-z0-9])){0,62}$`. Regex for values: `^(-|_|[a-z0-9]){0,63}$`. Providing a `null` value for a key will remove that key.", + description="Object that represents the labels of an object. Regex for keys: `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a `null` value for a key will remove that key.", ) name: Annotated[str, Field(strict=True, max_length=127)] = Field( description="The name for a General Object. Matches Names and also UUIDs." @@ -42,7 +44,10 @@ class CreateNetworkPayload(BaseModel): routed: Optional[StrictBool] = Field( default=None, description="Shows if the network is routed and therefore accessible from other networks." ) - __properties: ClassVar[List[str]] = ["addressFamily", "dhcp", "labels", "name", "routed"] + routing_table_id: Optional[Annotated[str, Field(min_length=36, strict=True, max_length=36)]] = Field( + default=None, description="Universally Unique Identifier (UUID).", alias="routingTableId" + ) + __properties: ClassVar[List[str]] = ["dhcp", "ipv4", "ipv6", "labels", "name", "routed", "routingTableId"] @field_validator("name") def name_validate_regular_expression(cls, value): @@ -51,6 +56,18 @@ def name_validate_regular_expression(cls, value): raise ValueError(r"must validate the regular expression /^[A-Za-z0-9]+([ \/._-]*[A-Za-z0-9]+)*$/") return value + @field_validator("routing_table_id") + def routing_table_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$", value): + raise ValueError( + r"must validate the regular expression /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/" + ) + return value + model_config = ConfigDict( populate_by_name=True, validate_assignment=True, @@ -88,9 +105,12 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) - # override the default output from pydantic by calling `to_dict()` of address_family - if self.address_family: - _dict["addressFamily"] = self.address_family.to_dict() + # override the default output from pydantic by calling `to_dict()` of ipv4 + if self.ipv4: + _dict["ipv4"] = self.ipv4.to_dict() + # override the default output from pydantic by calling `to_dict()` of ipv6 + if self.ipv6: + _dict["ipv6"] = self.ipv6.to_dict() return _dict @classmethod @@ -104,15 +124,13 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate( { - "addressFamily": ( - CreateNetworkAddressFamily.from_dict(obj["addressFamily"]) - if obj.get("addressFamily") is not None - else None - ), "dhcp": obj.get("dhcp"), + "ipv4": CreateNetworkIPv4.from_dict(obj["ipv4"]) if obj.get("ipv4") is not None else None, + "ipv6": CreateNetworkIPv6.from_dict(obj["ipv6"]) if obj.get("ipv6") is not None else None, "labels": obj.get("labels"), "name": obj.get("name"), "routed": obj.get("routed"), + "routingTableId": obj.get("routingTableId"), } ) return _obj diff --git a/services/iaas/src/stackit/iaas/models/create_nic_payload.py b/services/iaas/src/stackit/iaas/models/create_nic_payload.py index f162f5aa..8e511220 100644 --- a/services/iaas/src/stackit/iaas/models/create_nic_payload.py +++ b/services/iaas/src/stackit/iaas/models/create_nic_payload.py @@ -5,7 +5,7 @@ This API allows you to create and modify IaaS resources. - The version of the OpenAPI document: 1 + The version of the OpenAPI document: 2beta1 Contact: stackit-iaas@mail.schwarz Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -40,6 +40,9 @@ class CreateNicPayload(BaseModel): allowed_addresses: Optional[List[AllowedAddressesInner]] = Field( default=None, description="A list of IPs or CIDR notations.", alias="allowedAddresses" ) + description: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field( + default=None, description="Description Object. Allows string up to 255 Characters." + ) device: Optional[Annotated[str, Field(min_length=36, strict=True, max_length=36)]] = Field( default=None, description="Universally Unique Identifier (UUID)." ) @@ -54,7 +57,7 @@ class CreateNicPayload(BaseModel): ) labels: Optional[Dict[str, Any]] = Field( default=None, - description="Object that represents the labels of an object. Regex for keys: `^[a-z]((-|_|[a-z0-9])){0,62}$`. Regex for values: `^(-|_|[a-z0-9]){0,63}$`. Providing a `null` value for a key will remove that key.", + description="Object that represents the labels of an object. Regex for keys: `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a `null` value for a key will remove that key.", ) mac: Optional[Annotated[str, Field(strict=True)]] = Field( default=None, description="Object that represents an MAC address." @@ -79,6 +82,7 @@ class CreateNicPayload(BaseModel): ) __properties: ClassVar[List[str]] = [ "allowedAddresses", + "description", "device", "id", "ipv4", @@ -256,6 +260,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if obj.get("allowedAddresses") is not None else None ), + "description": obj.get("description"), "device": obj.get("device"), "id": obj.get("id"), "ipv4": obj.get("ipv4"), diff --git a/services/iaas/src/stackit/iaas/models/create_protocol.py b/services/iaas/src/stackit/iaas/models/create_protocol.py index 7bbd005f..11df88fa 100644 --- a/services/iaas/src/stackit/iaas/models/create_protocol.py +++ b/services/iaas/src/stackit/iaas/models/create_protocol.py @@ -5,7 +5,7 @@ This API allows you to create and modify IaaS resources. - The version of the OpenAPI document: 1 + The version of the OpenAPI document: 2beta1 Contact: stackit-iaas@mail.schwarz Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/services/iaas/src/stackit/iaas/models/create_public_ip_payload.py b/services/iaas/src/stackit/iaas/models/create_public_ip_payload.py index a8893ba6..2e1aa821 100644 --- a/services/iaas/src/stackit/iaas/models/create_public_ip_payload.py +++ b/services/iaas/src/stackit/iaas/models/create_public_ip_payload.py @@ -5,7 +5,7 @@ This API allows you to create and modify IaaS resources. - The version of the OpenAPI document: 1 + The version of the OpenAPI document: 2beta1 Contact: stackit-iaas@mail.schwarz Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -32,11 +32,11 @@ class CreatePublicIPPayload(BaseModel): default=None, description="Universally Unique Identifier (UUID)." ) ip: Optional[Annotated[str, Field(strict=True)]] = Field( - default=None, description="Object that represents an IP address." + default=None, description="String that represents an IPv4 address." ) labels: Optional[Dict[str, Any]] = Field( default=None, - description="Object that represents the labels of an object. Regex for keys: `^[a-z]((-|_|[a-z0-9])){0,62}$`. Regex for values: `^(-|_|[a-z0-9]){0,63}$`. Providing a `null` value for a key will remove that key.", + description="Object that represents the labels of an object. Regex for keys: `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a `null` value for a key will remove that key.", ) network_interface: Optional[Annotated[str, Field(min_length=36, strict=True, max_length=36)]] = Field( default=None, description="Associate the public IP with a network interface (ID).", alias="networkInterface" @@ -62,11 +62,11 @@ def ip_validate_regular_expression(cls, value): return value if not re.match( - r"((^\s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))\s*$)|(^\s*((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$))", + r"^\s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))\s*$", value, ): raise ValueError( - r"must validate the regular expression /((^\s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))\s*$)|(^\s*((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$))/" + r"must validate the regular expression /^\s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))\s*$/" ) return value diff --git a/services/iaas/src/stackit/iaas/models/create_security_group_payload.py b/services/iaas/src/stackit/iaas/models/create_security_group_payload.py index d2b8e9b3..1e2fdcca 100644 --- a/services/iaas/src/stackit/iaas/models/create_security_group_payload.py +++ b/services/iaas/src/stackit/iaas/models/create_security_group_payload.py @@ -5,7 +5,7 @@ This API allows you to create and modify IaaS resources. - The version of the OpenAPI document: 1 + The version of the OpenAPI document: 2beta1 Contact: stackit-iaas@mail.schwarz Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -42,7 +42,7 @@ class CreateSecurityGroupPayload(BaseModel): ) labels: Optional[Dict[str, Any]] = Field( default=None, - description="Object that represents the labels of an object. Regex for keys: `^[a-z]((-|_|[a-z0-9])){0,62}$`. Regex for values: `^(-|_|[a-z0-9]){0,63}$`. Providing a `null` value for a key will remove that key.", + description="Object that represents the labels of an object. Regex for keys: `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a `null` value for a key will remove that key.", ) name: Annotated[str, Field(strict=True, max_length=127)] = Field( description="The name for a General Object. Matches Names and also UUIDs." diff --git a/services/iaas/src/stackit/iaas/models/create_security_group_rule_payload.py b/services/iaas/src/stackit/iaas/models/create_security_group_rule_payload.py index e19c7082..a23953ea 100644 --- a/services/iaas/src/stackit/iaas/models/create_security_group_rule_payload.py +++ b/services/iaas/src/stackit/iaas/models/create_security_group_rule_payload.py @@ -5,7 +5,7 @@ This API allows you to create and modify IaaS resources. - The version of the OpenAPI document: 1 + The version of the OpenAPI document: 2beta1 Contact: stackit-iaas@mail.schwarz Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -17,6 +17,7 @@ import json import pprint import re # noqa: F401 +from datetime import datetime from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator @@ -32,6 +33,9 @@ class CreateSecurityGroupRulePayload(BaseModel): Object that represents a request body for security group rule creation. """ # noqa: E501 + created_at: Optional[datetime] = Field( + default=None, description="Date-time when resource was created.", alias="createdAt" + ) description: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field( default=None, description="Description Object. Allows string up to 255 Characters." ) @@ -57,8 +61,12 @@ class CreateSecurityGroupRulePayload(BaseModel): security_group_id: Optional[Annotated[str, Field(min_length=36, strict=True, max_length=36)]] = Field( default=None, description="Universally Unique Identifier (UUID).", alias="securityGroupId" ) + updated_at: Optional[datetime] = Field( + default=None, description="Date-time when resource was last updated.", alias="updatedAt" + ) protocol: Optional[CreateProtocol] = None __properties: ClassVar[List[str]] = [ + "createdAt", "description", "direction", "ethertype", @@ -68,6 +76,7 @@ class CreateSecurityGroupRulePayload(BaseModel): "portRange", "remoteSecurityGroupId", "securityGroupId", + "updatedAt", "protocol", ] @@ -153,11 +162,15 @@ def to_dict(self) -> Dict[str, Any]: are ignored. * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. """ excluded_fields: Set[str] = set( [ + "created_at", "id", "security_group_id", + "updated_at", ] ) @@ -188,6 +201,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate( { + "createdAt": obj.get("createdAt"), "description": obj.get("description"), "direction": obj.get("direction"), "ethertype": obj.get("ethertype") if obj.get("ethertype") is not None else "IPv4", @@ -199,6 +213,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "portRange": PortRange.from_dict(obj["portRange"]) if obj.get("portRange") is not None else None, "remoteSecurityGroupId": obj.get("remoteSecurityGroupId"), "securityGroupId": obj.get("securityGroupId"), + "updatedAt": obj.get("updatedAt"), "protocol": CreateProtocol.from_dict(obj["protocol"]) if obj.get("protocol") is not None else None, } ) diff --git a/services/iaas/src/stackit/iaas/models/create_security_group_rule_protocol.py b/services/iaas/src/stackit/iaas/models/create_security_group_rule_protocol.py index 65d20539..66dbf11f 100644 --- a/services/iaas/src/stackit/iaas/models/create_security_group_rule_protocol.py +++ b/services/iaas/src/stackit/iaas/models/create_security_group_rule_protocol.py @@ -5,7 +5,7 @@ This API allows you to create and modify IaaS resources. - The version of the OpenAPI document: 1 + The version of the OpenAPI document: 2beta1 Contact: stackit-iaas@mail.schwarz Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/services/iaas/src/stackit/iaas/models/create_server_networking.py b/services/iaas/src/stackit/iaas/models/create_server_networking.py index 3964fb38..c471f914 100644 --- a/services/iaas/src/stackit/iaas/models/create_server_networking.py +++ b/services/iaas/src/stackit/iaas/models/create_server_networking.py @@ -5,7 +5,7 @@ This API allows you to create and modify IaaS resources. - The version of the OpenAPI document: 1 + The version of the OpenAPI document: 2beta1 Contact: stackit-iaas@mail.schwarz Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/services/iaas/src/stackit/iaas/models/create_server_networking_with_nics.py b/services/iaas/src/stackit/iaas/models/create_server_networking_with_nics.py index 3de15f0f..d4da9107 100644 --- a/services/iaas/src/stackit/iaas/models/create_server_networking_with_nics.py +++ b/services/iaas/src/stackit/iaas/models/create_server_networking_with_nics.py @@ -5,7 +5,7 @@ This API allows you to create and modify IaaS resources. - The version of the OpenAPI document: 1 + The version of the OpenAPI document: 2beta1 Contact: stackit-iaas@mail.schwarz Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/services/iaas/src/stackit/iaas/models/create_server_payload.py b/services/iaas/src/stackit/iaas/models/create_server_payload.py index 54159cf6..1b1d4bca 100644 --- a/services/iaas/src/stackit/iaas/models/create_server_payload.py +++ b/services/iaas/src/stackit/iaas/models/create_server_payload.py @@ -5,7 +5,7 @@ This API allows you to create and modify IaaS resources. - The version of the OpenAPI document: 1 + The version of the OpenAPI document: 2beta1 Contact: stackit-iaas@mail.schwarz Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -31,21 +31,23 @@ from typing_extensions import Annotated, Self from stackit.iaas.models.boot_volume import BootVolume -from stackit.iaas.models.create_server_payload_networking import ( - CreateServerPayloadNetworking, +from stackit.iaas.models.create_server_payload_all_of_networking import ( + CreateServerPayloadAllOfNetworking, ) +from stackit.iaas.models.server_agent import ServerAgent from stackit.iaas.models.server_maintenance import ServerMaintenance from stackit.iaas.models.server_network import ServerNetwork class CreateServerPayload(BaseModel): """ - Representation of a single server object. + Object that represents the request body for a server create. """ # noqa: E501 affinity_group: Optional[Annotated[str, Field(min_length=36, strict=True, max_length=36)]] = Field( default=None, description="The affinity group the server is assigned to.", alias="affinityGroup" ) + agent: Optional[ServerAgent] = None availability_zone: Optional[StrictStr] = Field( default=None, description="This is the availability zone requested during server creation. If none is provided during the creation request and an existing volume will be used as boot volume it will be set to the same availability zone as the volume. For requests with no volumes involved it will be set to the metro availability zone.", @@ -67,7 +69,7 @@ class CreateServerPayload(BaseModel): ) labels: Optional[Dict[str, Any]] = Field( default=None, - description="Object that represents the labels of an object. Regex for keys: `^[a-z]((-|_|[a-z0-9])){0,62}$`. Regex for values: `^(-|_|[a-z0-9]){0,63}$`. Providing a `null` value for a key will remove that key.", + description="Object that represents the labels of an object. Regex for keys: `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a `null` value for a key will remove that key.", ) launched_at: Optional[datetime] = Field( default=None, description="Date-time when resource was launched.", alias="launchedAt" @@ -81,7 +83,7 @@ class CreateServerPayload(BaseModel): description="Object that represents the metadata of an object. Regex for keys: `^[a-zA-Z0-9-_:. ]{1,255}$`. Regex for values: `^.{0,255}$`. Providing a `null` value for a key will remove that key.", ) name: Annotated[str, Field(strict=True, max_length=63)] = Field(description="The name for a Server.") - networking: Optional[CreateServerPayloadNetworking] = None + networking: CreateServerPayloadAllOfNetworking nics: Optional[List[ServerNetwork]] = Field( default=None, description="The list of network interfaces (NICs) attached to the server. Only shown when detailed information is requested.", @@ -118,6 +120,7 @@ class CreateServerPayload(BaseModel): ) __properties: ClassVar[List[str]] = [ "affinityGroup", + "agent", "availabilityZone", "bootVolume", "createdAt", @@ -265,6 +268,9 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # override the default output from pydantic by calling `to_dict()` of agent + if self.agent: + _dict["agent"] = self.agent.to_dict() # override the default output from pydantic by calling `to_dict()` of boot_volume if self.boot_volume: _dict["bootVolume"] = self.boot_volume.to_dict() @@ -295,6 +301,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate( { "affinityGroup": obj.get("affinityGroup"), + "agent": ServerAgent.from_dict(obj["agent"]) if obj.get("agent") is not None else None, "availabilityZone": obj.get("availabilityZone"), "bootVolume": BootVolume.from_dict(obj["bootVolume"]) if obj.get("bootVolume") is not None else None, "createdAt": obj.get("createdAt"), @@ -313,7 +320,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "metadata": obj.get("metadata"), "name": obj.get("name"), "networking": ( - CreateServerPayloadNetworking.from_dict(obj["networking"]) + CreateServerPayloadAllOfNetworking.from_dict(obj["networking"]) if obj.get("networking") is not None else None ), diff --git a/services/iaas/src/stackit/iaas/models/create_server_payload_all_of_networking.py b/services/iaas/src/stackit/iaas/models/create_server_payload_all_of_networking.py new file mode 100644 index 00000000..17f3ea10 --- /dev/null +++ b/services/iaas/src/stackit/iaas/models/create_server_payload_all_of_networking.py @@ -0,0 +1,151 @@ +# coding: utf-8 + +""" + IaaS-API + + This API allows you to create and modify IaaS resources. + + The version of the OpenAPI document: 2beta1 + Contact: stackit-iaas@mail.schwarz + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +from __future__ import annotations + +import json +import pprint +from typing import Any, Dict, Optional, Set, Union + +from pydantic import ( + BaseModel, + ConfigDict, + ValidationError, + field_validator, +) +from typing_extensions import Self + +from stackit.iaas.models.create_server_networking import CreateServerNetworking +from stackit.iaas.models.create_server_networking_with_nics import ( + CreateServerNetworkingWithNics, +) + + +CREATESERVERPAYLOADALLOFNETWORKING_ONE_OF_SCHEMAS = ["CreateServerNetworking", "CreateServerNetworkingWithNics"] + + +class CreateServerPayloadAllOfNetworking(BaseModel): + """ + CreateServerPayloadAllOfNetworking + """ + + # data type: CreateServerNetworking + oneof_schema_1_validator: Optional[CreateServerNetworking] = None + # data type: CreateServerNetworkingWithNics + oneof_schema_2_validator: Optional[CreateServerNetworkingWithNics] = None + actual_instance: Optional[Union[CreateServerNetworking, CreateServerNetworkingWithNics]] = None + one_of_schemas: Set[str] = {"CreateServerNetworking", "CreateServerNetworkingWithNics"} + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator("actual_instance") + def actual_instance_must_validate_oneof(cls, v): + instance = CreateServerPayloadAllOfNetworking.model_construct() + error_messages = [] + match = 0 + # validate data type: CreateServerNetworking + if not isinstance(v, CreateServerNetworking): + error_messages.append(f"Error! Input type `{type(v)}` is not `CreateServerNetworking`") + else: + match += 1 + # validate data type: CreateServerNetworkingWithNics + if not isinstance(v, CreateServerNetworkingWithNics): + error_messages.append(f"Error! Input type `{type(v)}` is not `CreateServerNetworkingWithNics`") + else: + match += 1 + if match == 0: + # no match + raise ValueError( + "No match found when setting `actual_instance` in CreateServerPayloadAllOfNetworking with oneOf schemas: CreateServerNetworking, CreateServerNetworkingWithNics. Details: " + + ", ".join(error_messages) + ) + else: + return v + + @classmethod + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # deserialize data into CreateServerNetworking + try: + instance.actual_instance = CreateServerNetworking.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into CreateServerNetworkingWithNics + try: + instance.actual_instance = CreateServerNetworkingWithNics.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError( + "Multiple matches found when deserializing the JSON string into CreateServerPayloadAllOfNetworking with oneOf schemas: CreateServerNetworking, CreateServerNetworkingWithNics. Details: " + + ", ".join(error_messages) + ) + elif match == 0: + # no match + raise ValueError( + "No match found when deserializing the JSON string into CreateServerPayloadAllOfNetworking with oneOf schemas: CreateServerNetworking, CreateServerNetworkingWithNics. Details: " + + ", ".join(error_messages) + ) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], CreateServerNetworking, CreateServerNetworkingWithNics]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) diff --git a/services/iaas/src/stackit/iaas/models/create_volume_payload.py b/services/iaas/src/stackit/iaas/models/create_volume_payload.py index a23cf6a3..68e4e85a 100644 --- a/services/iaas/src/stackit/iaas/models/create_volume_payload.py +++ b/services/iaas/src/stackit/iaas/models/create_volume_payload.py @@ -5,7 +5,7 @@ This API allows you to create and modify IaaS resources. - The version of the OpenAPI document: 1 + The version of the OpenAPI document: 2beta1 Contact: stackit-iaas@mail.schwarz Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -59,7 +59,7 @@ class CreateVolumePayload(BaseModel): image_config: Optional[ImageConfig] = Field(default=None, alias="imageConfig") labels: Optional[Dict[str, Any]] = Field( default=None, - description="Object that represents the labels of an object. Regex for keys: `^[a-z]((-|_|[a-z0-9])){0,62}$`. Regex for values: `^(-|_|[a-z0-9]){0,63}$`. Providing a `null` value for a key will remove that key.", + description="Object that represents the labels of an object. Regex for keys: `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a `null` value for a key will remove that key.", ) name: Optional[Annotated[str, Field(strict=True, max_length=127)]] = Field( default=None, description="The name for a General Object. Matches Names and also UUIDs." diff --git a/services/iaas/src/stackit/iaas/models/destination_cidrv4.py b/services/iaas/src/stackit/iaas/models/destination_cidrv4.py new file mode 100644 index 00000000..73d8ec90 --- /dev/null +++ b/services/iaas/src/stackit/iaas/models/destination_cidrv4.py @@ -0,0 +1,96 @@ +# coding: utf-8 + +""" + IaaS-API + + This API allows you to create and modify IaaS resources. + + The version of the OpenAPI document: 2beta1 + Contact: stackit-iaas@mail.schwarz + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from typing import Any, ClassVar, Dict, List, Optional, Set + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing_extensions import Annotated, Self + + +class DestinationCIDRv4(BaseModel): + """ + IPv4 Classless Inter-Domain Routing (CIDR) Object. + """ # noqa: E501 + + type: StrictStr + value: Annotated[str, Field(strict=True)] = Field(description="An CIDRv4 string.") + __properties: ClassVar[List[str]] = ["type", "value"] + + @field_validator("value") + def value_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match( + r"^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(\/(3[0-2]|2[0-9]|1[0-9]|[0-9]))$", + value, + ): + raise ValueError( + r"must validate the regular expression /^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(\/(3[0-2]|2[0-9]|1[0-9]|[0-9]))$/" + ) + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of DestinationCIDRv4 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DestinationCIDRv4 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({"type": obj.get("type"), "value": obj.get("value")}) + return _obj diff --git a/services/iaas/src/stackit/iaas/models/destination_cidrv6.py b/services/iaas/src/stackit/iaas/models/destination_cidrv6.py new file mode 100644 index 00000000..960c7930 --- /dev/null +++ b/services/iaas/src/stackit/iaas/models/destination_cidrv6.py @@ -0,0 +1,96 @@ +# coding: utf-8 + +""" + IaaS-API + + This API allows you to create and modify IaaS resources. + + The version of the OpenAPI document: 2beta1 + Contact: stackit-iaas@mail.schwarz + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from typing import Any, ClassVar, Dict, List, Optional, Set + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing_extensions import Annotated, Self + + +class DestinationCIDRv6(BaseModel): + """ + IPv6 Classless Inter-Domain Routing (CIDR) Object. + """ # noqa: E501 + + type: StrictStr + value: Annotated[str, Field(strict=True)] = Field(description="An CIDRv6 string.") + __properties: ClassVar[List[str]] = ["type", "value"] + + @field_validator("value") + def value_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match( + r"^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))(\/((1(1[0-9]|2[0-8]))|([0-9][0-9])|([0-9])))?$", + value, + ): + raise ValueError( + r"must validate the regular expression /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))(\/((1(1[0-9]|2[0-8]))|([0-9][0-9])|([0-9])))?$/" + ) + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of DestinationCIDRv6 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DestinationCIDRv6 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({"type": obj.get("type"), "value": obj.get("value")}) + return _obj diff --git a/services/iaas/src/stackit/iaas/models/error.py b/services/iaas/src/stackit/iaas/models/error.py index 26045f25..acc00582 100644 --- a/services/iaas/src/stackit/iaas/models/error.py +++ b/services/iaas/src/stackit/iaas/models/error.py @@ -5,7 +5,7 @@ This API allows you to create and modify IaaS resources. - The version of the OpenAPI document: 1 + The version of the OpenAPI document: 2beta1 Contact: stackit-iaas@mail.schwarz Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/services/iaas/src/stackit/iaas/models/get_server_log200_response.py b/services/iaas/src/stackit/iaas/models/get_server_log200_response.py index 54f70898..b1b5dcc9 100644 --- a/services/iaas/src/stackit/iaas/models/get_server_log200_response.py +++ b/services/iaas/src/stackit/iaas/models/get_server_log200_response.py @@ -5,7 +5,7 @@ This API allows you to create and modify IaaS resources. - The version of the OpenAPI document: 1 + The version of the OpenAPI document: 2beta1 Contact: stackit-iaas@mail.schwarz Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/services/iaas/src/stackit/iaas/models/icmp_parameters.py b/services/iaas/src/stackit/iaas/models/icmp_parameters.py index 8e9983ff..591ced5e 100644 --- a/services/iaas/src/stackit/iaas/models/icmp_parameters.py +++ b/services/iaas/src/stackit/iaas/models/icmp_parameters.py @@ -5,7 +5,7 @@ This API allows you to create and modify IaaS resources. - The version of the OpenAPI document: 1 + The version of the OpenAPI document: 2beta1 Contact: stackit-iaas@mail.schwarz Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/services/iaas/src/stackit/iaas/models/image.py b/services/iaas/src/stackit/iaas/models/image.py index aa2d89b7..130c868a 100644 --- a/services/iaas/src/stackit/iaas/models/image.py +++ b/services/iaas/src/stackit/iaas/models/image.py @@ -5,7 +5,7 @@ This API allows you to create and modify IaaS resources. - The version of the OpenAPI document: 1 + The version of the OpenAPI document: 2beta1 Contact: stackit-iaas@mail.schwarz Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -55,7 +55,7 @@ class Image(BaseModel): ) labels: Optional[Dict[str, Any]] = Field( default=None, - description="Object that represents the labels of an object. Regex for keys: `^[a-z]((-|_|[a-z0-9])){0,62}$`. Regex for values: `^(-|_|[a-z0-9]){0,63}$`. Providing a `null` value for a key will remove that key.", + description="Object that represents the labels of an object. Regex for keys: `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a `null` value for a key will remove that key.", ) min_disk_size: Optional[StrictInt] = Field(default=None, description="Size in Gigabyte.", alias="minDiskSize") min_ram: Optional[StrictInt] = Field(default=None, description="Size in Megabyte.", alias="minRam") diff --git a/services/iaas/src/stackit/iaas/models/image_agent.py b/services/iaas/src/stackit/iaas/models/image_agent.py index 216daf59..20b45e45 100644 --- a/services/iaas/src/stackit/iaas/models/image_agent.py +++ b/services/iaas/src/stackit/iaas/models/image_agent.py @@ -5,7 +5,7 @@ This API allows you to create and modify IaaS resources. - The version of the OpenAPI document: 1 + The version of the OpenAPI document: 2beta1 Contact: stackit-iaas@mail.schwarz Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/services/iaas/src/stackit/iaas/models/image_checksum.py b/services/iaas/src/stackit/iaas/models/image_checksum.py index 422423d7..304c9cdf 100644 --- a/services/iaas/src/stackit/iaas/models/image_checksum.py +++ b/services/iaas/src/stackit/iaas/models/image_checksum.py @@ -5,7 +5,7 @@ This API allows you to create and modify IaaS resources. - The version of the OpenAPI document: 1 + The version of the OpenAPI document: 2beta1 Contact: stackit-iaas@mail.schwarz Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/services/iaas/src/stackit/iaas/models/image_config.py b/services/iaas/src/stackit/iaas/models/image_config.py index 8ba1b9cc..7bb83c3d 100644 --- a/services/iaas/src/stackit/iaas/models/image_config.py +++ b/services/iaas/src/stackit/iaas/models/image_config.py @@ -5,7 +5,7 @@ This API allows you to create and modify IaaS resources. - The version of the OpenAPI document: 1 + The version of the OpenAPI document: 2beta1 Contact: stackit-iaas@mail.schwarz Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/services/iaas/src/stackit/iaas/models/image_create_response.py b/services/iaas/src/stackit/iaas/models/image_create_response.py index 5cb8f749..194c0ca7 100644 --- a/services/iaas/src/stackit/iaas/models/image_create_response.py +++ b/services/iaas/src/stackit/iaas/models/image_create_response.py @@ -5,7 +5,7 @@ This API allows you to create and modify IaaS resources. - The version of the OpenAPI document: 1 + The version of the OpenAPI document: 2beta1 Contact: stackit-iaas@mail.schwarz Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/services/iaas/src/stackit/iaas/models/image_list_response.py b/services/iaas/src/stackit/iaas/models/image_list_response.py index 2c1ec7c4..2178125a 100644 --- a/services/iaas/src/stackit/iaas/models/image_list_response.py +++ b/services/iaas/src/stackit/iaas/models/image_list_response.py @@ -5,7 +5,7 @@ This API allows you to create and modify IaaS resources. - The version of the OpenAPI document: 1 + The version of the OpenAPI document: 2beta1 Contact: stackit-iaas@mail.schwarz Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/services/iaas/src/stackit/iaas/models/image_share.py b/services/iaas/src/stackit/iaas/models/image_share.py index 2c157866..01a6d487 100644 --- a/services/iaas/src/stackit/iaas/models/image_share.py +++ b/services/iaas/src/stackit/iaas/models/image_share.py @@ -5,7 +5,7 @@ This API allows you to create and modify IaaS resources. - The version of the OpenAPI document: 1 + The version of the OpenAPI document: 2beta1 Contact: stackit-iaas@mail.schwarz Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/services/iaas/src/stackit/iaas/models/image_share_consumer.py b/services/iaas/src/stackit/iaas/models/image_share_consumer.py index aa2fb3c0..92af921f 100644 --- a/services/iaas/src/stackit/iaas/models/image_share_consumer.py +++ b/services/iaas/src/stackit/iaas/models/image_share_consumer.py @@ -5,7 +5,7 @@ This API allows you to create and modify IaaS resources. - The version of the OpenAPI document: 1 + The version of the OpenAPI document: 2beta1 Contact: stackit-iaas@mail.schwarz Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/services/iaas/src/stackit/iaas/models/key_pair_list_response.py b/services/iaas/src/stackit/iaas/models/key_pair_list_response.py index f0d9160c..d50231f3 100644 --- a/services/iaas/src/stackit/iaas/models/key_pair_list_response.py +++ b/services/iaas/src/stackit/iaas/models/key_pair_list_response.py @@ -5,7 +5,7 @@ This API allows you to create and modify IaaS resources. - The version of the OpenAPI document: 1 + The version of the OpenAPI document: 2beta1 Contact: stackit-iaas@mail.schwarz Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/services/iaas/src/stackit/iaas/models/keypair.py b/services/iaas/src/stackit/iaas/models/keypair.py index cc0e9adc..c304fd29 100644 --- a/services/iaas/src/stackit/iaas/models/keypair.py +++ b/services/iaas/src/stackit/iaas/models/keypair.py @@ -5,7 +5,7 @@ This API allows you to create and modify IaaS resources. - The version of the OpenAPI document: 1 + The version of the OpenAPI document: 2beta1 Contact: stackit-iaas@mail.schwarz Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -37,7 +37,7 @@ class Keypair(BaseModel): ) labels: Optional[Dict[str, Any]] = Field( default=None, - description="Object that represents the labels of an object. Regex for keys: `^[a-z]((-|_|[a-z0-9])){0,62}$`. Regex for values: `^(-|_|[a-z0-9]){0,63}$`. Providing a `null` value for a key will remove that key.", + description="Object that represents the labels of an object. Regex for keys: `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a `null` value for a key will remove that key.", ) name: Optional[Annotated[str, Field(strict=True, max_length=127)]] = Field( default=None, diff --git a/services/iaas/src/stackit/iaas/models/machine_type.py b/services/iaas/src/stackit/iaas/models/machine_type.py index 58ec7ec4..849b1323 100644 --- a/services/iaas/src/stackit/iaas/models/machine_type.py +++ b/services/iaas/src/stackit/iaas/models/machine_type.py @@ -5,7 +5,7 @@ This API allows you to create and modify IaaS resources. - The version of the OpenAPI document: 1 + The version of the OpenAPI document: 2beta1 Contact: stackit-iaas@mail.schwarz Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/services/iaas/src/stackit/iaas/models/machine_type_list_response.py b/services/iaas/src/stackit/iaas/models/machine_type_list_response.py index 37baec8d..11be539d 100644 --- a/services/iaas/src/stackit/iaas/models/machine_type_list_response.py +++ b/services/iaas/src/stackit/iaas/models/machine_type_list_response.py @@ -5,7 +5,7 @@ This API allows you to create and modify IaaS resources. - The version of the OpenAPI document: 1 + The version of the OpenAPI document: 2beta1 Contact: stackit-iaas@mail.schwarz Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/services/iaas/src/stackit/iaas/models/management_route.py b/services/iaas/src/stackit/iaas/models/management_route.py new file mode 100644 index 00000000..b75e7157 --- /dev/null +++ b/services/iaas/src/stackit/iaas/models/management_route.py @@ -0,0 +1,141 @@ +# coding: utf-8 + +""" + IaaS-API + + This API allows you to create and modify IaaS resources. + + The version of the OpenAPI document: 2beta1 + Contact: stackit-iaas@mail.schwarz + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from datetime import datetime +from typing import Any, ClassVar, Dict, List, Optional, Set + +from pydantic import BaseModel, ConfigDict, Field, field_validator +from typing_extensions import Annotated, Self + +from stackit.iaas.models.management_route_destination import ManagementRouteDestination +from stackit.iaas.models.management_route_nexthop import ManagementRouteNexthop + + +class ManagementRoute(BaseModel): + """ + Object represents a management network route (IPv6 only). + """ # noqa: E501 + + created_at: Optional[datetime] = Field( + default=None, description="Date-time when resource was created.", alias="createdAt" + ) + destination: ManagementRouteDestination + id: Optional[Annotated[str, Field(min_length=36, strict=True, max_length=36)]] = Field( + default=None, description="Universally Unique Identifier (UUID)." + ) + labels: Optional[Dict[str, Any]] = Field( + default=None, + description="Object that represents the labels of an object. Regex for keys: `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a `null` value for a key will remove that key.", + ) + nexthop: ManagementRouteNexthop + updated_at: Optional[datetime] = Field( + default=None, description="Date-time when resource was last updated.", alias="updatedAt" + ) + __properties: ClassVar[List[str]] = ["createdAt", "destination", "id", "labels", "nexthop", "updatedAt"] + + @field_validator("id") + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$", value): + raise ValueError( + r"must validate the regular expression /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/" + ) + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ManagementRoute from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + """ + excluded_fields: Set[str] = set( + [ + "created_at", + "id", + "updated_at", + ] + ) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of destination + if self.destination: + _dict["destination"] = self.destination.to_dict() + # override the default output from pydantic by calling `to_dict()` of nexthop + if self.nexthop: + _dict["nexthop"] = self.nexthop.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ManagementRoute from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "createdAt": obj.get("createdAt"), + "destination": ( + ManagementRouteDestination.from_dict(obj["destination"]) + if obj.get("destination") is not None + else None + ), + "id": obj.get("id"), + "labels": obj.get("labels"), + "nexthop": ManagementRouteNexthop.from_dict(obj["nexthop"]) if obj.get("nexthop") is not None else None, + "updatedAt": obj.get("updatedAt"), + } + ) + return _obj diff --git a/services/iaas/src/stackit/iaas/models/management_route_destination.py b/services/iaas/src/stackit/iaas/models/management_route_destination.py new file mode 100644 index 00000000..46fe7760 --- /dev/null +++ b/services/iaas/src/stackit/iaas/models/management_route_destination.py @@ -0,0 +1,96 @@ +# coding: utf-8 + +""" + IaaS-API + + This API allows you to create and modify IaaS resources. + + The version of the OpenAPI document: 2beta1 + Contact: stackit-iaas@mail.schwarz + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from typing import Any, ClassVar, Dict, List, Optional, Set + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing_extensions import Annotated, Self + + +class ManagementRouteDestination(BaseModel): + """ + ManagementRouteDestination + """ # noqa: E501 + + type: StrictStr + value: Annotated[str, Field(strict=True)] = Field(description="An CIDRv6 string.") + __properties: ClassVar[List[str]] = ["type", "value"] + + @field_validator("value") + def value_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match( + r"^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))(\/((1(1[0-9]|2[0-8]))|([0-9][0-9])|([0-9])))?$", + value, + ): + raise ValueError( + r"must validate the regular expression /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))(\/((1(1[0-9]|2[0-8]))|([0-9][0-9])|([0-9])))?$/" + ) + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ManagementRouteDestination from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ManagementRouteDestination from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({"type": obj.get("type"), "value": obj.get("value")}) + return _obj diff --git a/services/iaas/src/stackit/iaas/models/management_route_list_response.py b/services/iaas/src/stackit/iaas/models/management_route_list_response.py new file mode 100644 index 00000000..aa034ba3 --- /dev/null +++ b/services/iaas/src/stackit/iaas/models/management_route_list_response.py @@ -0,0 +1,99 @@ +# coding: utf-8 + +""" + IaaS-API + + This API allows you to create and modify IaaS resources. + + The version of the OpenAPI document: 2beta1 + Contact: stackit-iaas@mail.schwarz + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +from __future__ import annotations + +import json +import pprint +from typing import Any, ClassVar, Dict, List, Optional, Set + +from pydantic import BaseModel, ConfigDict, Field +from typing_extensions import Self + +from stackit.iaas.models.management_route import ManagementRoute + + +class ManagementRouteListResponse(BaseModel): + """ + Management route list response. + """ # noqa: E501 + + items: List[ManagementRoute] = Field(description="A list of management routes.") + __properties: ClassVar[List[str]] = ["items"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ManagementRouteListResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in items (list) + _items = [] + if self.items: + for _item in self.items: + if _item: + _items.append(_item.to_dict()) + _dict["items"] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ManagementRouteListResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "items": ( + [ManagementRoute.from_dict(_item) for _item in obj["items"]] + if obj.get("items") is not None + else None + ) + } + ) + return _obj diff --git a/services/iaas/src/stackit/iaas/models/management_route_nexthop.py b/services/iaas/src/stackit/iaas/models/management_route_nexthop.py new file mode 100644 index 00000000..45b344b8 --- /dev/null +++ b/services/iaas/src/stackit/iaas/models/management_route_nexthop.py @@ -0,0 +1,96 @@ +# coding: utf-8 + +""" + IaaS-API + + This API allows you to create and modify IaaS resources. + + The version of the OpenAPI document: 2beta1 + Contact: stackit-iaas@mail.schwarz + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from typing import Any, ClassVar, Dict, List, Optional, Set + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing_extensions import Annotated, Self + + +class ManagementRouteNexthop(BaseModel): + """ + ManagementRouteNexthop + """ # noqa: E501 + + type: StrictStr + value: Annotated[str, Field(strict=True)] = Field(description="An IPv6 address.") + __properties: ClassVar[List[str]] = ["type", "value"] + + @field_validator("value") + def value_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match( + r"^\s*((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$", + value, + ): + raise ValueError( + r"must validate the regular expression /^\s*((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$/" + ) + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ManagementRouteNexthop from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ManagementRouteNexthop from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({"type": obj.get("type"), "value": obj.get("value")}) + return _obj diff --git a/services/iaas/src/stackit/iaas/models/network.py b/services/iaas/src/stackit/iaas/models/network.py index 5fa55c10..1be44fd1 100644 --- a/services/iaas/src/stackit/iaas/models/network.py +++ b/services/iaas/src/stackit/iaas/models/network.py @@ -5,7 +5,7 @@ This API allows you to create and modify IaaS resources. - The version of the OpenAPI document: 1 + The version of the OpenAPI document: 2beta1 Contact: stackit-iaas@mail.schwarz Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -30,47 +30,36 @@ ) from typing_extensions import Annotated, Self +from stackit.iaas.models.network_ipv4 import NetworkIPv4 +from stackit.iaas.models.network_ipv6 import NetworkIPv6 + class Network(BaseModel): """ - Object that represents a network. + Object that represents a network. If no routing table is specified, the default routing table is used. """ # noqa: E501 created_at: Optional[datetime] = Field( default=None, description="Date-time when resource was created.", alias="createdAt" ) dhcp: Optional[StrictBool] = Field(default=None, description="Enable or disable DHCP for a network.") - gateway: Optional[Annotated[str, Field(strict=True)]] = Field( - default=None, - description="The gateway of a network. If not specified the first IP of the network will be assigned as the gateway. If 'null' is sent, then the network doesn't have a gateway.", - ) - gatewayv6: Optional[Annotated[str, Field(strict=True)]] = Field( - default=None, - description="The gateway of a network. If not specified the first IP of the network will be assigned as the gateway. If 'null' is sent, then the network doesn't have a gateway.", + id: Annotated[str, Field(min_length=36, strict=True, max_length=36)] = Field( + description="Universally Unique Identifier (UUID)." ) + ipv4: Optional[NetworkIPv4] = None + ipv6: Optional[NetworkIPv6] = None labels: Optional[Dict[str, Any]] = Field( default=None, - description="Object that represents the labels of an object. Regex for keys: `^[a-z]((-|_|[a-z0-9])){0,62}$`. Regex for values: `^(-|_|[a-z0-9]){0,63}$`. Providing a `null` value for a key will remove that key.", - ) - name: Annotated[str, Field(strict=True, max_length=255)] - nameservers: Optional[Annotated[List[Annotated[str, Field(strict=True)]], Field(max_length=3)]] = Field( - default=None, description="A list containing DNS Servers/Nameservers for IPv4." - ) - nameservers_v6: Optional[Annotated[List[Annotated[str, Field(strict=True)]], Field(max_length=3)]] = Field( - default=None, description="A list containing DNS Servers/Nameservers for IPv6.", alias="nameserversV6" - ) - network_id: Annotated[str, Field(min_length=36, strict=True, max_length=36)] = Field( - description="Universally Unique Identifier (UUID).", alias="networkId" - ) - prefixes: Optional[List[Annotated[str, Field(strict=True)]]] = None - prefixes_v6: Optional[List[Annotated[str, Field(strict=True)]]] = Field(default=None, alias="prefixesV6") - public_ip: Optional[Annotated[str, Field(strict=True)]] = Field( - default=None, description="Object that represents an IP address.", alias="publicIp" + description="Object that represents the labels of an object. Regex for keys: `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a `null` value for a key will remove that key.", ) + name: StrictStr routed: Optional[StrictBool] = Field( default=None, description="Shows if the network is routed and therefore accessible from other networks." ) - state: StrictStr = Field( + routing_table_id: Optional[Annotated[str, Field(min_length=36, strict=True, max_length=36)]] = Field( + default=None, description="Universally Unique Identifier (UUID).", alias="routingTableId" + ) + status: StrictStr = Field( description="The state of a resource object. Possible values: `CREATING`, `CREATED`, `DELETING`, `DELETED`, `FAILED`, `UPDATED`, `UPDATING`." ) updated_at: Optional[datetime] = Field( @@ -79,53 +68,19 @@ class Network(BaseModel): __properties: ClassVar[List[str]] = [ "createdAt", "dhcp", - "gateway", - "gatewayv6", + "id", + "ipv4", + "ipv6", "labels", "name", - "nameservers", - "nameserversV6", - "networkId", - "prefixes", - "prefixesV6", - "publicIp", "routed", - "state", + "routingTableId", + "status", "updatedAt", ] - @field_validator("gateway") - def gateway_validate_regular_expression(cls, value): - """Validates the regular expression""" - if value is None: - return value - - if not re.match( - r"((^\s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))\s*$)|(^\s*((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$))", - value, - ): - raise ValueError( - r"must validate the regular expression /((^\s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))\s*$)|(^\s*((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$))/" - ) - return value - - @field_validator("gatewayv6") - def gatewayv6_validate_regular_expression(cls, value): - """Validates the regular expression""" - if value is None: - return value - - if not re.match( - r"((^\s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))\s*$)|(^\s*((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$))", - value, - ): - raise ValueError( - r"must validate the regular expression /((^\s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))\s*$)|(^\s*((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$))/" - ) - return value - - @field_validator("network_id") - def network_id_validate_regular_expression(cls, value): + @field_validator("id") + def id_validate_regular_expression(cls, value): """Validates the regular expression""" if not re.match(r"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$", value): raise ValueError( @@ -133,18 +88,15 @@ def network_id_validate_regular_expression(cls, value): ) return value - @field_validator("public_ip") - def public_ip_validate_regular_expression(cls, value): + @field_validator("routing_table_id") + def routing_table_id_validate_regular_expression(cls, value): """Validates the regular expression""" if value is None: return value - if not re.match( - r"((^\s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))\s*$)|(^\s*((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$))", - value, - ): + if not re.match(r"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$", value): raise ValueError( - r"must validate the regular expression /((^\s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))\s*$)|(^\s*((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$))/" + r"must validate the regular expression /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/" ) return value @@ -192,16 +144,12 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) - # set to None if gateway (nullable) is None - # and model_fields_set contains the field - if self.gateway is None and "gateway" in self.model_fields_set: - _dict["gateway"] = None - - # set to None if gatewayv6 (nullable) is None - # and model_fields_set contains the field - if self.gatewayv6 is None and "gatewayv6" in self.model_fields_set: - _dict["gatewayv6"] = None - + # override the default output from pydantic by calling `to_dict()` of ipv4 + if self.ipv4: + _dict["ipv4"] = self.ipv4.to_dict() + # override the default output from pydantic by calling `to_dict()` of ipv6 + if self.ipv6: + _dict["ipv6"] = self.ipv6.to_dict() return _dict @classmethod @@ -217,18 +165,14 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: { "createdAt": obj.get("createdAt"), "dhcp": obj.get("dhcp"), - "gateway": obj.get("gateway"), - "gatewayv6": obj.get("gatewayv6"), + "id": obj.get("id"), + "ipv4": NetworkIPv4.from_dict(obj["ipv4"]) if obj.get("ipv4") is not None else None, + "ipv6": NetworkIPv6.from_dict(obj["ipv6"]) if obj.get("ipv6") is not None else None, "labels": obj.get("labels"), "name": obj.get("name"), - "nameservers": obj.get("nameservers"), - "nameserversV6": obj.get("nameserversV6"), - "networkId": obj.get("networkId"), - "prefixes": obj.get("prefixes"), - "prefixesV6": obj.get("prefixesV6"), - "publicIp": obj.get("publicIp"), "routed": obj.get("routed"), - "state": obj.get("state"), + "routingTableId": obj.get("routingTableId"), + "status": obj.get("status"), "updatedAt": obj.get("updatedAt"), } ) diff --git a/services/iaas/src/stackit/iaas/models/network_area.py b/services/iaas/src/stackit/iaas/models/network_area.py index 653ef4fb..4031e768 100644 --- a/services/iaas/src/stackit/iaas/models/network_area.py +++ b/services/iaas/src/stackit/iaas/models/network_area.py @@ -5,7 +5,7 @@ This API allows you to create and modify IaaS resources. - The version of the OpenAPI document: 1 + The version of the OpenAPI document: 2beta1 Contact: stackit-iaas@mail.schwarz Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -23,49 +23,37 @@ from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator from typing_extensions import Annotated, Self -from stackit.iaas.models.network_area_ipv4 import NetworkAreaIPv4 - class NetworkArea(BaseModel): """ Object that represents a network area. """ # noqa: E501 - area_id: Annotated[str, Field(min_length=36, strict=True, max_length=36)] = Field( - description="Universally Unique Identifier (UUID).", alias="areaId" - ) created_at: Optional[datetime] = Field( default=None, description="Date-time when resource was created.", alias="createdAt" ) - ipv4: Optional[NetworkAreaIPv4] = None + id: Optional[Annotated[str, Field(min_length=36, strict=True, max_length=36)]] = Field( + default=None, description="Universally Unique Identifier (UUID)." + ) labels: Optional[Dict[str, Any]] = Field( default=None, - description="Object that represents the labels of an object. Regex for keys: `^[a-z]((-|_|[a-z0-9])){0,62}$`. Regex for values: `^(-|_|[a-z0-9]){0,63}$`. Providing a `null` value for a key will remove that key.", + description="Object that represents the labels of an object. Regex for keys: `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a `null` value for a key will remove that key.", ) name: StrictStr - project_count: Annotated[int, Field(strict=True, ge=0)] = Field( - description="The amount of projects currently referencing a specific area.", alias="projectCount" - ) - state: StrictStr = Field( - description="The state of a resource object. Possible values: `CREATING`, `CREATED`, `DELETING`, `DELETED`, `FAILED`, `UPDATED`, `UPDATING`." + project_count: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field( + default=None, description="The amount of projects currently referencing a specific area.", alias="projectCount" ) updated_at: Optional[datetime] = Field( default=None, description="Date-time when resource was last updated.", alias="updatedAt" ) - __properties: ClassVar[List[str]] = [ - "areaId", - "createdAt", - "ipv4", - "labels", - "name", - "projectCount", - "state", - "updatedAt", - ] - - @field_validator("area_id") - def area_id_validate_regular_expression(cls, value): + __properties: ClassVar[List[str]] = ["createdAt", "id", "labels", "name", "projectCount", "updatedAt"] + + @field_validator("id") + def id_validate_regular_expression(cls, value): """Validates the regular expression""" + if value is None: + return value + if not re.match(r"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$", value): raise ValueError( r"must validate the regular expression /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/" @@ -103,10 +91,14 @@ def to_dict(self) -> Dict[str, Any]: are ignored. * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. """ excluded_fields: Set[str] = set( [ "created_at", + "id", + "project_count", "updated_at", ] ) @@ -116,9 +108,6 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) - # override the default output from pydantic by calling `to_dict()` of ipv4 - if self.ipv4: - _dict["ipv4"] = self.ipv4.to_dict() return _dict @classmethod @@ -132,13 +121,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate( { - "areaId": obj.get("areaId"), "createdAt": obj.get("createdAt"), - "ipv4": NetworkAreaIPv4.from_dict(obj["ipv4"]) if obj.get("ipv4") is not None else None, + "id": obj.get("id"), "labels": obj.get("labels"), "name": obj.get("name"), "projectCount": obj.get("projectCount"), - "state": obj.get("state"), "updatedAt": obj.get("updatedAt"), } ) diff --git a/services/iaas/src/stackit/iaas/models/network_area_list_response.py b/services/iaas/src/stackit/iaas/models/network_area_list_response.py index 0254e9d9..b7bba38f 100644 --- a/services/iaas/src/stackit/iaas/models/network_area_list_response.py +++ b/services/iaas/src/stackit/iaas/models/network_area_list_response.py @@ -5,7 +5,7 @@ This API allows you to create and modify IaaS resources. - The version of the OpenAPI document: 1 + The version of the OpenAPI document: 2beta1 Contact: stackit-iaas@mail.schwarz Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/services/iaas/src/stackit/iaas/models/network_ipv4.py b/services/iaas/src/stackit/iaas/models/network_ipv4.py new file mode 100644 index 00000000..e6061397 --- /dev/null +++ b/services/iaas/src/stackit/iaas/models/network_ipv4.py @@ -0,0 +1,140 @@ +# coding: utf-8 + +""" + IaaS-API + + This API allows you to create and modify IaaS resources. + + The version of the OpenAPI document: 2beta1 + Contact: stackit-iaas@mail.schwarz + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from typing import Any, ClassVar, Dict, List, Optional, Set + +from pydantic import BaseModel, ConfigDict, Field, field_validator +from typing_extensions import Annotated, Self + + +class NetworkIPv4(BaseModel): + """ + Object that represents the IPv4 part of a network. + """ # noqa: E501 + + gateway: Optional[Annotated[str, Field(strict=True)]] = Field( + default=None, + description="The IPv4 gateway of a network. If not specified the first IP of the network will be assigned as the gateway. If 'null' is sent, then the network doesn't have a gateway.", + ) + nameservers: Optional[Annotated[List[Annotated[str, Field(strict=True)]], Field(max_length=3)]] = Field( + default=None, description="A list containing DNS Servers/Nameservers for IPv4." + ) + prefixes: List[Annotated[str, Field(strict=True)]] + public_ip: Optional[Annotated[str, Field(strict=True)]] = Field( + default=None, description="String that represents an IPv4 address.", alias="publicIp" + ) + __properties: ClassVar[List[str]] = ["gateway", "nameservers", "prefixes", "publicIp"] + + @field_validator("gateway") + def gateway_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match( + r"^\s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))\s*$", + value, + ): + raise ValueError( + r"must validate the regular expression /^\s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))\s*$/" + ) + return value + + @field_validator("public_ip") + def public_ip_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match( + r"^\s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))\s*$", + value, + ): + raise ValueError( + r"must validate the regular expression /^\s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))\s*$/" + ) + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of NetworkIPv4 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * OpenAPI `readOnly` fields are excluded. + """ + excluded_fields: Set[str] = set( + [ + "public_ip", + ] + ) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if gateway (nullable) is None + # and model_fields_set contains the field + if self.gateway is None and "gateway" in self.model_fields_set: + _dict["gateway"] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of NetworkIPv4 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "gateway": obj.get("gateway"), + "nameservers": obj.get("nameservers"), + "prefixes": obj.get("prefixes"), + "publicIp": obj.get("publicIp"), + } + ) + return _obj diff --git a/services/iaas/src/stackit/iaas/models/network_ipv6.py b/services/iaas/src/stackit/iaas/models/network_ipv6.py new file mode 100644 index 00000000..2e1d21b3 --- /dev/null +++ b/services/iaas/src/stackit/iaas/models/network_ipv6.py @@ -0,0 +1,112 @@ +# coding: utf-8 + +""" + IaaS-API + + This API allows you to create and modify IaaS resources. + + The version of the OpenAPI document: 2beta1 + Contact: stackit-iaas@mail.schwarz + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from typing import Any, ClassVar, Dict, List, Optional, Set + +from pydantic import BaseModel, ConfigDict, Field, field_validator +from typing_extensions import Annotated, Self + + +class NetworkIPv6(BaseModel): + """ + Object that represents the IPv6 part of a network. + """ # noqa: E501 + + gateway: Optional[Annotated[str, Field(strict=True)]] = Field( + default=None, + description="The IPv6 gateway of a network. If not specified the first IP of the network will be assigned as the gateway. If 'null' is sent, then the network doesn't have a gateway.", + ) + nameservers: Optional[Annotated[List[Annotated[str, Field(strict=True)]], Field(max_length=3)]] = Field( + default=None, description="A list containing DNS Servers/Nameservers for IPv6." + ) + prefixes: List[Annotated[str, Field(strict=True)]] + __properties: ClassVar[List[str]] = ["gateway", "nameservers", "prefixes"] + + @field_validator("gateway") + def gateway_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match( + r"^\s*((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$", + value, + ): + raise ValueError( + r"must validate the regular expression /^\s*((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$/" + ) + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of NetworkIPv6 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if gateway (nullable) is None + # and model_fields_set contains the field + if self.gateway is None and "gateway" in self.model_fields_set: + _dict["gateway"] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of NetworkIPv6 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + {"gateway": obj.get("gateway"), "nameservers": obj.get("nameservers"), "prefixes": obj.get("prefixes")} + ) + return _obj diff --git a/services/iaas/src/stackit/iaas/models/network_list_response.py b/services/iaas/src/stackit/iaas/models/network_list_response.py index 5e4bb3a6..9dd2b9e9 100644 --- a/services/iaas/src/stackit/iaas/models/network_list_response.py +++ b/services/iaas/src/stackit/iaas/models/network_list_response.py @@ -5,7 +5,7 @@ This API allows you to create and modify IaaS resources. - The version of the OpenAPI document: 1 + The version of the OpenAPI document: 2beta1 Contact: stackit-iaas@mail.schwarz Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/services/iaas/src/stackit/iaas/models/network_range.py b/services/iaas/src/stackit/iaas/models/network_range.py index d81ac0cc..65a02e01 100644 --- a/services/iaas/src/stackit/iaas/models/network_range.py +++ b/services/iaas/src/stackit/iaas/models/network_range.py @@ -5,7 +5,7 @@ This API allows you to create and modify IaaS resources. - The version of the OpenAPI document: 1 + The version of the OpenAPI document: 2beta1 Contact: stackit-iaas@mail.schwarz Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -32,17 +32,17 @@ class NetworkRange(BaseModel): created_at: Optional[datetime] = Field( default=None, description="Date-time when resource was created.", alias="createdAt" ) - network_range_id: Optional[Annotated[str, Field(min_length=36, strict=True, max_length=36)]] = Field( - default=None, description="Universally Unique Identifier (UUID).", alias="networkRangeId" + id: Optional[Annotated[str, Field(min_length=36, strict=True, max_length=36)]] = Field( + default=None, description="Universally Unique Identifier (UUID)." ) prefix: Annotated[str, Field(strict=True)] = Field(description="Classless Inter-Domain Routing (CIDR).") updated_at: Optional[datetime] = Field( default=None, description="Date-time when resource was last updated.", alias="updatedAt" ) - __properties: ClassVar[List[str]] = ["createdAt", "networkRangeId", "prefix", "updatedAt"] + __properties: ClassVar[List[str]] = ["createdAt", "id", "prefix", "updatedAt"] - @field_validator("network_range_id") - def network_range_id_validate_regular_expression(cls, value): + @field_validator("id") + def id_validate_regular_expression(cls, value): """Validates the regular expression""" if value is None: return value @@ -101,7 +101,7 @@ def to_dict(self) -> Dict[str, Any]: excluded_fields: Set[str] = set( [ "created_at", - "network_range_id", + "id", "updated_at", ] ) @@ -125,7 +125,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate( { "createdAt": obj.get("createdAt"), - "networkRangeId": obj.get("networkRangeId"), + "id": obj.get("id"), "prefix": obj.get("prefix"), "updatedAt": obj.get("updatedAt"), } diff --git a/services/iaas/src/stackit/iaas/models/network_range_list_response.py b/services/iaas/src/stackit/iaas/models/network_range_list_response.py index 3d1fc60b..4ec182de 100644 --- a/services/iaas/src/stackit/iaas/models/network_range_list_response.py +++ b/services/iaas/src/stackit/iaas/models/network_range_list_response.py @@ -5,7 +5,7 @@ This API allows you to create and modify IaaS resources. - The version of the OpenAPI document: 1 + The version of the OpenAPI document: 2beta1 Contact: stackit-iaas@mail.schwarz Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/services/iaas/src/stackit/iaas/models/nexthop_blackhole.py b/services/iaas/src/stackit/iaas/models/nexthop_blackhole.py new file mode 100644 index 00000000..d2f18482 --- /dev/null +++ b/services/iaas/src/stackit/iaas/models/nexthop_blackhole.py @@ -0,0 +1,82 @@ +# coding: utf-8 + +""" + IaaS-API + + This API allows you to create and modify IaaS resources. + + The version of the OpenAPI document: 2beta1 + Contact: stackit-iaas@mail.schwarz + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +from __future__ import annotations + +import json +import pprint +from typing import Any, ClassVar, Dict, List, Optional, Set + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing_extensions import Self + + +class NexthopBlackhole(BaseModel): + """ + Object that represents a blackhole route. + """ # noqa: E501 + + type: StrictStr + __properties: ClassVar[List[str]] = ["type"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of NexthopBlackhole from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of NexthopBlackhole from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({"type": obj.get("type")}) + return _obj diff --git a/services/iaas/src/stackit/iaas/models/nexthop_internet.py b/services/iaas/src/stackit/iaas/models/nexthop_internet.py new file mode 100644 index 00000000..a3817995 --- /dev/null +++ b/services/iaas/src/stackit/iaas/models/nexthop_internet.py @@ -0,0 +1,82 @@ +# coding: utf-8 + +""" + IaaS-API + + This API allows you to create and modify IaaS resources. + + The version of the OpenAPI document: 2beta1 + Contact: stackit-iaas@mail.schwarz + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +from __future__ import annotations + +import json +import pprint +from typing import Any, ClassVar, Dict, List, Optional, Set + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing_extensions import Self + + +class NexthopInternet(BaseModel): + """ + Object that represents a route to the internet. + """ # noqa: E501 + + type: StrictStr + __properties: ClassVar[List[str]] = ["type"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of NexthopInternet from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of NexthopInternet from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({"type": obj.get("type")}) + return _obj diff --git a/services/iaas/src/stackit/iaas/models/nexthop_ipv4.py b/services/iaas/src/stackit/iaas/models/nexthop_ipv4.py new file mode 100644 index 00000000..b5e32bca --- /dev/null +++ b/services/iaas/src/stackit/iaas/models/nexthop_ipv4.py @@ -0,0 +1,96 @@ +# coding: utf-8 + +""" + IaaS-API + + This API allows you to create and modify IaaS resources. + + The version of the OpenAPI document: 2beta1 + Contact: stackit-iaas@mail.schwarz + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from typing import Any, ClassVar, Dict, List, Optional, Set + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing_extensions import Annotated, Self + + +class NexthopIPv4(BaseModel): + """ + Object that represents an IPv4 address. + """ # noqa: E501 + + type: StrictStr + value: Annotated[str, Field(strict=True)] = Field(description="An IPv4 address.") + __properties: ClassVar[List[str]] = ["type", "value"] + + @field_validator("value") + def value_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match( + r"^\s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))\s*$", + value, + ): + raise ValueError( + r"must validate the regular expression /^\s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))\s*$/" + ) + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of NexthopIPv4 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of NexthopIPv4 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({"type": obj.get("type"), "value": obj.get("value")}) + return _obj diff --git a/services/iaas/src/stackit/iaas/models/nexthop_ipv6.py b/services/iaas/src/stackit/iaas/models/nexthop_ipv6.py new file mode 100644 index 00000000..b0088f81 --- /dev/null +++ b/services/iaas/src/stackit/iaas/models/nexthop_ipv6.py @@ -0,0 +1,96 @@ +# coding: utf-8 + +""" + IaaS-API + + This API allows you to create and modify IaaS resources. + + The version of the OpenAPI document: 2beta1 + Contact: stackit-iaas@mail.schwarz + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from typing import Any, ClassVar, Dict, List, Optional, Set + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing_extensions import Annotated, Self + + +class NexthopIPv6(BaseModel): + """ + Object that represents an IPv6 address. + """ # noqa: E501 + + type: StrictStr + value: Annotated[str, Field(strict=True)] = Field(description="An IPv6 address.") + __properties: ClassVar[List[str]] = ["type", "value"] + + @field_validator("value") + def value_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match( + r"^\s*((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$", + value, + ): + raise ValueError( + r"must validate the regular expression /^\s*((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$/" + ) + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of NexthopIPv6 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of NexthopIPv6 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({"type": obj.get("type"), "value": obj.get("value")}) + return _obj diff --git a/services/iaas/src/stackit/iaas/models/nic.py b/services/iaas/src/stackit/iaas/models/nic.py index c485d18f..32f3a2a7 100644 --- a/services/iaas/src/stackit/iaas/models/nic.py +++ b/services/iaas/src/stackit/iaas/models/nic.py @@ -5,7 +5,7 @@ This API allows you to create and modify IaaS resources. - The version of the OpenAPI document: 1 + The version of the OpenAPI document: 2beta1 Contact: stackit-iaas@mail.schwarz Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -40,6 +40,9 @@ class NIC(BaseModel): allowed_addresses: Optional[List[AllowedAddressesInner]] = Field( default=None, description="A list of IPs or CIDR notations.", alias="allowedAddresses" ) + description: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field( + default=None, description="Description Object. Allows string up to 255 Characters." + ) device: Optional[Annotated[str, Field(min_length=36, strict=True, max_length=36)]] = Field( default=None, description="Universally Unique Identifier (UUID)." ) @@ -54,7 +57,7 @@ class NIC(BaseModel): ) labels: Optional[Dict[str, Any]] = Field( default=None, - description="Object that represents the labels of an object. Regex for keys: `^[a-z]((-|_|[a-z0-9])){0,62}$`. Regex for values: `^(-|_|[a-z0-9]){0,63}$`. Providing a `null` value for a key will remove that key.", + description="Object that represents the labels of an object. Regex for keys: `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a `null` value for a key will remove that key.", ) mac: Optional[Annotated[str, Field(strict=True)]] = Field( default=None, description="Object that represents an MAC address." @@ -79,6 +82,7 @@ class NIC(BaseModel): ) __properties: ClassVar[List[str]] = [ "allowedAddresses", + "description", "device", "id", "ipv4", @@ -256,6 +260,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if obj.get("allowedAddresses") is not None else None ), + "description": obj.get("description"), "device": obj.get("device"), "id": obj.get("id"), "ipv4": obj.get("ipv4"), diff --git a/services/iaas/src/stackit/iaas/models/nic_list_response.py b/services/iaas/src/stackit/iaas/models/nic_list_response.py index b8265d23..f5d38b18 100644 --- a/services/iaas/src/stackit/iaas/models/nic_list_response.py +++ b/services/iaas/src/stackit/iaas/models/nic_list_response.py @@ -5,7 +5,7 @@ This API allows you to create and modify IaaS resources. - The version of the OpenAPI document: 1 + The version of the OpenAPI document: 2beta1 Contact: stackit-iaas@mail.schwarz Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/services/iaas/src/stackit/iaas/models/partial_update_network_area_payload.py b/services/iaas/src/stackit/iaas/models/partial_update_network_area_payload.py index 96dc70df..c0b9b97e 100644 --- a/services/iaas/src/stackit/iaas/models/partial_update_network_area_payload.py +++ b/services/iaas/src/stackit/iaas/models/partial_update_network_area_payload.py @@ -5,7 +5,7 @@ This API allows you to create and modify IaaS resources. - The version of the OpenAPI document: 1 + The version of the OpenAPI document: 2beta1 Contact: stackit-iaas@mail.schwarz Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -16,39 +16,23 @@ import json import pprint -import re # noqa: F401 from typing import Any, ClassVar, Dict, List, Optional, Set -from pydantic import BaseModel, ConfigDict, Field, field_validator -from typing_extensions import Annotated, Self - -from stackit.iaas.models.update_area_address_family import UpdateAreaAddressFamily +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing_extensions import Self class PartialUpdateNetworkAreaPayload(BaseModel): """ - PartialUpdateNetworkAreaPayload + Object that represents the network area update request. """ # noqa: E501 - address_family: Optional[UpdateAreaAddressFamily] = Field(default=None, alias="addressFamily") labels: Optional[Dict[str, Any]] = Field( default=None, - description="Object that represents the labels of an object. Regex for keys: `^[a-z]((-|_|[a-z0-9])){0,62}$`. Regex for values: `^(-|_|[a-z0-9]){0,63}$`. Providing a `null` value for a key will remove that key.", - ) - name: Optional[Annotated[str, Field(strict=True, max_length=127)]] = Field( - default=None, description="The name for a General Object. Matches Names and also UUIDs." + description="Object that represents the labels of an object. Regex for keys: `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a `null` value for a key will remove that key.", ) - __properties: ClassVar[List[str]] = ["addressFamily", "labels", "name"] - - @field_validator("name") - def name_validate_regular_expression(cls, value): - """Validates the regular expression""" - if value is None: - return value - - if not re.match(r"^[A-Za-z0-9]+([ \/._-]*[A-Za-z0-9]+)*$", value): - raise ValueError(r"must validate the regular expression /^[A-Za-z0-9]+([ \/._-]*[A-Za-z0-9]+)*$/") - return value + name: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["labels", "name"] model_config = ConfigDict( populate_by_name=True, @@ -87,9 +71,6 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) - # override the default output from pydantic by calling `to_dict()` of address_family - if self.address_family: - _dict["addressFamily"] = self.address_family.to_dict() return _dict @classmethod @@ -101,15 +82,5 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "addressFamily": ( - UpdateAreaAddressFamily.from_dict(obj["addressFamily"]) - if obj.get("addressFamily") is not None - else None - ), - "labels": obj.get("labels"), - "name": obj.get("name"), - } - ) + _obj = cls.model_validate({"labels": obj.get("labels"), "name": obj.get("name")}) return _obj diff --git a/services/iaas/src/stackit/iaas/models/partial_update_network_payload.py b/services/iaas/src/stackit/iaas/models/partial_update_network_payload.py index d82ca6e1..ea32d115 100644 --- a/services/iaas/src/stackit/iaas/models/partial_update_network_payload.py +++ b/services/iaas/src/stackit/iaas/models/partial_update_network_payload.py @@ -5,7 +5,7 @@ This API allows you to create and modify IaaS resources. - The version of the OpenAPI document: 1 + The version of the OpenAPI document: 2beta1 Contact: stackit-iaas@mail.schwarz Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -22,7 +22,8 @@ from pydantic import BaseModel, ConfigDict, Field, StrictBool, field_validator from typing_extensions import Annotated, Self -from stackit.iaas.models.update_network_address_family import UpdateNetworkAddressFamily +from stackit.iaas.models.update_network_ipv4_body import UpdateNetworkIPv4Body +from stackit.iaas.models.update_network_ipv6_body import UpdateNetworkIPv6Body class PartialUpdateNetworkPayload(BaseModel): @@ -30,11 +31,12 @@ class PartialUpdateNetworkPayload(BaseModel): Object that represents the request body for a network update. """ # noqa: E501 - address_family: Optional[UpdateNetworkAddressFamily] = Field(default=None, alias="addressFamily") dhcp: Optional[StrictBool] = Field(default=None, description="Enable or disable DHCP for a network.") + ipv4: Optional[UpdateNetworkIPv4Body] = None + ipv6: Optional[UpdateNetworkIPv6Body] = None labels: Optional[Dict[str, Any]] = Field( default=None, - description="Object that represents the labels of an object. Regex for keys: `^[a-z]((-|_|[a-z0-9])){0,62}$`. Regex for values: `^(-|_|[a-z0-9]){0,63}$`. Providing a `null` value for a key will remove that key.", + description="Object that represents the labels of an object. Regex for keys: `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a `null` value for a key will remove that key.", ) name: Optional[Annotated[str, Field(strict=True, max_length=127)]] = Field( default=None, description="The name for a General Object. Matches Names and also UUIDs." @@ -42,7 +44,10 @@ class PartialUpdateNetworkPayload(BaseModel): routed: Optional[StrictBool] = Field( default=None, description="Shows if the network is routed and therefore accessible from other networks." ) - __properties: ClassVar[List[str]] = ["addressFamily", "dhcp", "labels", "name", "routed"] + routing_table_id: Optional[Annotated[str, Field(min_length=36, strict=True, max_length=36)]] = Field( + default=None, description="Universally Unique Identifier (UUID).", alias="routingTableId" + ) + __properties: ClassVar[List[str]] = ["dhcp", "ipv4", "ipv6", "labels", "name", "routed", "routingTableId"] @field_validator("name") def name_validate_regular_expression(cls, value): @@ -54,6 +59,18 @@ def name_validate_regular_expression(cls, value): raise ValueError(r"must validate the regular expression /^[A-Za-z0-9]+([ \/._-]*[A-Za-z0-9]+)*$/") return value + @field_validator("routing_table_id") + def routing_table_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$", value): + raise ValueError( + r"must validate the regular expression /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/" + ) + return value + model_config = ConfigDict( populate_by_name=True, validate_assignment=True, @@ -91,9 +108,12 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) - # override the default output from pydantic by calling `to_dict()` of address_family - if self.address_family: - _dict["addressFamily"] = self.address_family.to_dict() + # override the default output from pydantic by calling `to_dict()` of ipv4 + if self.ipv4: + _dict["ipv4"] = self.ipv4.to_dict() + # override the default output from pydantic by calling `to_dict()` of ipv6 + if self.ipv6: + _dict["ipv6"] = self.ipv6.to_dict() return _dict @classmethod @@ -107,15 +127,13 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate( { - "addressFamily": ( - UpdateNetworkAddressFamily.from_dict(obj["addressFamily"]) - if obj.get("addressFamily") is not None - else None - ), "dhcp": obj.get("dhcp"), + "ipv4": UpdateNetworkIPv4Body.from_dict(obj["ipv4"]) if obj.get("ipv4") is not None else None, + "ipv6": UpdateNetworkIPv6Body.from_dict(obj["ipv6"]) if obj.get("ipv6") is not None else None, "labels": obj.get("labels"), "name": obj.get("name"), "routed": obj.get("routed"), + "routingTableId": obj.get("routingTableId"), } ) return _obj diff --git a/services/iaas/src/stackit/iaas/models/port_range.py b/services/iaas/src/stackit/iaas/models/port_range.py index d2b416a7..ae760e3e 100644 --- a/services/iaas/src/stackit/iaas/models/port_range.py +++ b/services/iaas/src/stackit/iaas/models/port_range.py @@ -5,7 +5,7 @@ This API allows you to create and modify IaaS resources. - The version of the OpenAPI document: 1 + The version of the OpenAPI document: 2beta1 Contact: stackit-iaas@mail.schwarz Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/services/iaas/src/stackit/iaas/models/project.py b/services/iaas/src/stackit/iaas/models/project.py index f598de50..399707fb 100644 --- a/services/iaas/src/stackit/iaas/models/project.py +++ b/services/iaas/src/stackit/iaas/models/project.py @@ -5,7 +5,7 @@ This API allows you to create and modify IaaS resources. - The version of the OpenAPI document: 1 + The version of the OpenAPI document: 2beta1 Contact: stackit-iaas@mail.schwarz Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -42,43 +42,20 @@ class Project(BaseModel): created_at: Optional[datetime] = Field( default=None, description="Date-time when resource was created.", alias="createdAt" ) - internet_access: Optional[StrictBool] = Field(default=None, alias="internetAccess") - openstack_project_id: Optional[Annotated[str, Field(min_length=32, strict=True, max_length=32)]] = Field( - default=None, - description="The identifier (ID) of the OpenStack project in the main region eu01.", - alias="openstackProjectId", - ) - project_id: Annotated[str, Field(min_length=36, strict=True, max_length=36)] = Field( - description="Universally Unique Identifier (UUID).", alias="projectId" + id: Annotated[str, Field(min_length=36, strict=True, max_length=36)] = Field( + description="Universally Unique Identifier (UUID)." ) - state: StrictStr = Field( + internet_access: Optional[StrictBool] = Field(default=None, alias="internetAccess") + status: StrictStr = Field( description="The state of a resource object. Possible values: `CREATING`, `CREATED`, `DELETING`, `DELETED`, `FAILED`, `UPDATED`, `UPDATING`." ) updated_at: Optional[datetime] = Field( default=None, description="Date-time when resource was last updated.", alias="updatedAt" ) - __properties: ClassVar[List[str]] = [ - "areaId", - "createdAt", - "internetAccess", - "openstackProjectId", - "projectId", - "state", - "updatedAt", - ] - - @field_validator("openstack_project_id") - def openstack_project_id_validate_regular_expression(cls, value): - """Validates the regular expression""" - if value is None: - return value + __properties: ClassVar[List[str]] = ["areaId", "createdAt", "id", "internetAccess", "status", "updatedAt"] - if not re.match(r"^[0-9a-f]{32}$", value): - raise ValueError(r"must validate the regular expression /^[0-9a-f]{32}$/") - return value - - @field_validator("project_id") - def project_id_validate_regular_expression(cls, value): + @field_validator("id") + def id_validate_regular_expression(cls, value): """Validates the regular expression""" if not re.match(r"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$", value): raise ValueError( @@ -117,12 +94,10 @@ def to_dict(self) -> Dict[str, Any]: are ignored. * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. - * OpenAPI `readOnly` fields are excluded. """ excluded_fields: Set[str] = set( [ "created_at", - "openstack_project_id", "updated_at", ] ) @@ -150,10 +125,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: { "areaId": AreaId.from_dict(obj["areaId"]) if obj.get("areaId") is not None else None, "createdAt": obj.get("createdAt"), + "id": obj.get("id"), "internetAccess": obj.get("internetAccess"), - "openstackProjectId": obj.get("openstackProjectId"), - "projectId": obj.get("projectId"), - "state": obj.get("state"), + "status": obj.get("status"), "updatedAt": obj.get("updatedAt"), } ) diff --git a/services/iaas/src/stackit/iaas/models/project_list_response.py b/services/iaas/src/stackit/iaas/models/project_list_response.py index a283b9ec..32c7eee9 100644 --- a/services/iaas/src/stackit/iaas/models/project_list_response.py +++ b/services/iaas/src/stackit/iaas/models/project_list_response.py @@ -5,7 +5,7 @@ This API allows you to create and modify IaaS resources. - The version of the OpenAPI document: 1 + The version of the OpenAPI document: 2beta1 Contact: stackit-iaas@mail.schwarz Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/services/iaas/src/stackit/iaas/models/protocol.py b/services/iaas/src/stackit/iaas/models/protocol.py index 6f972070..c1621abe 100644 --- a/services/iaas/src/stackit/iaas/models/protocol.py +++ b/services/iaas/src/stackit/iaas/models/protocol.py @@ -5,7 +5,7 @@ This API allows you to create and modify IaaS resources. - The version of the OpenAPI document: 1 + The version of the OpenAPI document: 2beta1 Contact: stackit-iaas@mail.schwarz Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/services/iaas/src/stackit/iaas/models/public_ip.py b/services/iaas/src/stackit/iaas/models/public_ip.py index 59ad9e8e..ebda9795 100644 --- a/services/iaas/src/stackit/iaas/models/public_ip.py +++ b/services/iaas/src/stackit/iaas/models/public_ip.py @@ -5,7 +5,7 @@ This API allows you to create and modify IaaS resources. - The version of the OpenAPI document: 1 + The version of the OpenAPI document: 2beta1 Contact: stackit-iaas@mail.schwarz Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -32,11 +32,11 @@ class PublicIp(BaseModel): default=None, description="Universally Unique Identifier (UUID)." ) ip: Optional[Annotated[str, Field(strict=True)]] = Field( - default=None, description="Object that represents an IP address." + default=None, description="String that represents an IPv4 address." ) labels: Optional[Dict[str, Any]] = Field( default=None, - description="Object that represents the labels of an object. Regex for keys: `^[a-z]((-|_|[a-z0-9])){0,62}$`. Regex for values: `^(-|_|[a-z0-9]){0,63}$`. Providing a `null` value for a key will remove that key.", + description="Object that represents the labels of an object. Regex for keys: `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a `null` value for a key will remove that key.", ) network_interface: Optional[Annotated[str, Field(min_length=36, strict=True, max_length=36)]] = Field( default=None, description="Associate the public IP with a network interface (ID).", alias="networkInterface" @@ -62,11 +62,11 @@ def ip_validate_regular_expression(cls, value): return value if not re.match( - r"((^\s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))\s*$)|(^\s*((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$))", + r"^\s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))\s*$", value, ): raise ValueError( - r"must validate the regular expression /((^\s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))\s*$)|(^\s*((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$))/" + r"must validate the regular expression /^\s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))\s*$/" ) return value diff --git a/services/iaas/src/stackit/iaas/models/public_ip_list_response.py b/services/iaas/src/stackit/iaas/models/public_ip_list_response.py index 3d4100a4..511187ad 100644 --- a/services/iaas/src/stackit/iaas/models/public_ip_list_response.py +++ b/services/iaas/src/stackit/iaas/models/public_ip_list_response.py @@ -5,7 +5,7 @@ This API allows you to create and modify IaaS resources. - The version of the OpenAPI document: 1 + The version of the OpenAPI document: 2beta1 Contact: stackit-iaas@mail.schwarz Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/services/iaas/src/stackit/iaas/models/public_network.py b/services/iaas/src/stackit/iaas/models/public_network.py index 4941a30c..267c7691 100644 --- a/services/iaas/src/stackit/iaas/models/public_network.py +++ b/services/iaas/src/stackit/iaas/models/public_network.py @@ -5,7 +5,7 @@ This API allows you to create and modify IaaS resources. - The version of the OpenAPI document: 1 + The version of the OpenAPI document: 2beta1 Contact: stackit-iaas@mail.schwarz Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -19,7 +19,7 @@ import re # noqa: F401 from typing import Any, ClassVar, Dict, List, Optional, Set -from pydantic import BaseModel, ConfigDict, Field, field_validator +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator from typing_extensions import Annotated, Self @@ -29,7 +29,8 @@ class PublicNetwork(BaseModel): """ # noqa: E501 cidr: Annotated[str, Field(strict=True)] = Field(description="Classless Inter-Domain Routing (CIDR).") - __properties: ClassVar[List[str]] = ["cidr"] + region: StrictStr = Field(description="Name of the region.") + __properties: ClassVar[List[str]] = ["cidr", "region"] @field_validator("cidr") def cidr_validate_regular_expression(cls, value): @@ -91,5 +92,5 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({"cidr": obj.get("cidr")}) + _obj = cls.model_validate({"cidr": obj.get("cidr"), "region": obj.get("region")}) return _obj diff --git a/services/iaas/src/stackit/iaas/models/public_network_list_response.py b/services/iaas/src/stackit/iaas/models/public_network_list_response.py index d48df60d..234e75a6 100644 --- a/services/iaas/src/stackit/iaas/models/public_network_list_response.py +++ b/services/iaas/src/stackit/iaas/models/public_network_list_response.py @@ -5,7 +5,7 @@ This API allows you to create and modify IaaS resources. - The version of the OpenAPI document: 1 + The version of the OpenAPI document: 2beta1 Contact: stackit-iaas@mail.schwarz Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/services/iaas/src/stackit/iaas/models/quota.py b/services/iaas/src/stackit/iaas/models/quota.py index 6494ced7..db8a989f 100644 --- a/services/iaas/src/stackit/iaas/models/quota.py +++ b/services/iaas/src/stackit/iaas/models/quota.py @@ -5,7 +5,7 @@ This API allows you to create and modify IaaS resources. - The version of the OpenAPI document: 1 + The version of the OpenAPI document: 2beta1 Contact: stackit-iaas@mail.schwarz Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/services/iaas/src/stackit/iaas/models/quota_list.py b/services/iaas/src/stackit/iaas/models/quota_list.py index 391182a0..1f490a4d 100644 --- a/services/iaas/src/stackit/iaas/models/quota_list.py +++ b/services/iaas/src/stackit/iaas/models/quota_list.py @@ -5,7 +5,7 @@ This API allows you to create and modify IaaS resources. - The version of the OpenAPI document: 1 + The version of the OpenAPI document: 2beta1 Contact: stackit-iaas@mail.schwarz Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/services/iaas/src/stackit/iaas/models/quota_list_response.py b/services/iaas/src/stackit/iaas/models/quota_list_response.py index b11df4ef..c10191b4 100644 --- a/services/iaas/src/stackit/iaas/models/quota_list_response.py +++ b/services/iaas/src/stackit/iaas/models/quota_list_response.py @@ -5,7 +5,7 @@ This API allows you to create and modify IaaS resources. - The version of the OpenAPI document: 1 + The version of the OpenAPI document: 2beta1 Contact: stackit-iaas@mail.schwarz Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/services/iaas/src/stackit/iaas/models/regional_area.py b/services/iaas/src/stackit/iaas/models/regional_area.py new file mode 100644 index 00000000..47e07f86 --- /dev/null +++ b/services/iaas/src/stackit/iaas/models/regional_area.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + IaaS-API + + This API allows you to create and modify IaaS resources. + + The version of the OpenAPI document: 2beta1 + Contact: stackit-iaas@mail.schwarz + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +from __future__ import annotations + +import json +import pprint +from typing import Any, ClassVar, Dict, List, Optional, Set + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing_extensions import Self + +from stackit.iaas.models.regional_area_ipv4 import RegionalAreaIPv4 + + +class RegionalArea(BaseModel): + """ + The basic properties of a regional network area. + """ # noqa: E501 + + ipv4: Optional[RegionalAreaIPv4] = None + status: Optional[StrictStr] = Field( + default=None, + description="The state of a resource object. Possible values: `CREATING`, `CREATED`, `DELETING`, `DELETED`, `FAILED`, `UPDATED`, `UPDATING`.", + ) + __properties: ClassVar[List[str]] = ["ipv4", "status"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of RegionalArea from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * OpenAPI `readOnly` fields are excluded. + """ + excluded_fields: Set[str] = set( + [ + "status", + ] + ) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of ipv4 + if self.ipv4: + _dict["ipv4"] = self.ipv4.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of RegionalArea from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "ipv4": RegionalAreaIPv4.from_dict(obj["ipv4"]) if obj.get("ipv4") is not None else None, + "status": obj.get("status"), + } + ) + return _obj diff --git a/services/iaas/src/stackit/iaas/models/regional_area_ipv4.py b/services/iaas/src/stackit/iaas/models/regional_area_ipv4.py new file mode 100644 index 00000000..cead99f1 --- /dev/null +++ b/services/iaas/src/stackit/iaas/models/regional_area_ipv4.py @@ -0,0 +1,141 @@ +# coding: utf-8 + +""" + IaaS-API + + This API allows you to create and modify IaaS resources. + + The version of the OpenAPI document: 2beta1 + Contact: stackit-iaas@mail.schwarz + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from typing import Any, ClassVar, Dict, List, Optional, Set + +from pydantic import BaseModel, ConfigDict, Field, field_validator +from typing_extensions import Annotated, Self + +from stackit.iaas.models.network_range import NetworkRange + + +class RegionalAreaIPv4(BaseModel): + """ + The regional IPv4 config of a network area. + """ # noqa: E501 + + default_nameservers: Optional[Annotated[List[Annotated[str, Field(strict=True)]], Field(max_length=3)]] = Field( + default=None, alias="defaultNameservers" + ) + default_prefix_len: Annotated[int, Field(le=29, strict=True, ge=24)] = Field( + description="The default prefix length for networks in the network area.", alias="defaultPrefixLen" + ) + max_prefix_len: Annotated[int, Field(le=29, strict=True, ge=24)] = Field( + description="The maximal prefix length for networks in the network area.", alias="maxPrefixLen" + ) + min_prefix_len: Annotated[int, Field(le=29, strict=True, ge=8)] = Field( + description="The minimal prefix length for networks in the network area.", alias="minPrefixLen" + ) + network_ranges: Annotated[List[NetworkRange], Field(min_length=1, max_length=64)] = Field( + description="A list of network ranges.", alias="networkRanges" + ) + transfer_network: Annotated[str, Field(strict=True)] = Field( + description="IPv4 Classless Inter-Domain Routing (CIDR).", alias="transferNetwork" + ) + __properties: ClassVar[List[str]] = [ + "defaultNameservers", + "defaultPrefixLen", + "maxPrefixLen", + "minPrefixLen", + "networkRanges", + "transferNetwork", + ] + + @field_validator("transfer_network") + def transfer_network_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match( + r"^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(\/(3[0-2]|2[0-9]|1[0-9]|[0-9]))$", + value, + ): + raise ValueError( + r"must validate the regular expression /^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(\/(3[0-2]|2[0-9]|1[0-9]|[0-9]))$/" + ) + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of RegionalAreaIPv4 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in network_ranges (list) + _items = [] + if self.network_ranges: + for _item in self.network_ranges: + if _item: + _items.append(_item.to_dict()) + _dict["networkRanges"] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of RegionalAreaIPv4 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "defaultNameservers": obj.get("defaultNameservers"), + "defaultPrefixLen": obj.get("defaultPrefixLen"), + "maxPrefixLen": obj.get("maxPrefixLen"), + "minPrefixLen": obj.get("minPrefixLen"), + "networkRanges": ( + [NetworkRange.from_dict(_item) for _item in obj["networkRanges"]] + if obj.get("networkRanges") is not None + else None + ), + "transferNetwork": obj.get("transferNetwork"), + } + ) + return _obj diff --git a/services/iaas/src/stackit/iaas/models/regional_area_list_response.py b/services/iaas/src/stackit/iaas/models/regional_area_list_response.py new file mode 100644 index 00000000..be19bc3f --- /dev/null +++ b/services/iaas/src/stackit/iaas/models/regional_area_list_response.py @@ -0,0 +1,99 @@ +# coding: utf-8 + +""" + IaaS-API + + This API allows you to create and modify IaaS resources. + + The version of the OpenAPI document: 2beta1 + Contact: stackit-iaas@mail.schwarz + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +from __future__ import annotations + +import json +import pprint +from typing import Any, ClassVar, Dict, List, Optional, Set + +from pydantic import BaseModel, ConfigDict +from typing_extensions import Self + +from stackit.iaas.models.regional_area import RegionalArea + + +class RegionalAreaListResponse(BaseModel): + """ + Regional area list response. + """ # noqa: E501 + + regions: Dict[str, RegionalArea] + __properties: ClassVar[List[str]] = ["regions"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of RegionalAreaListResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each value in regions (dict) + _field_dict = {} + if self.regions: + for _key in self.regions: + if self.regions[_key]: + _field_dict[_key] = self.regions[_key].to_dict() + _dict["regions"] = _field_dict + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of RegionalAreaListResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "regions": ( + dict((_k, RegionalArea.from_dict(_v)) for _k, _v in obj["regions"].items()) + if obj.get("regions") is not None + else None + ) + } + ) + return _obj diff --git a/services/iaas/src/stackit/iaas/models/request.py b/services/iaas/src/stackit/iaas/models/request.py index 1aa9a287..312c6a04 100644 --- a/services/iaas/src/stackit/iaas/models/request.py +++ b/services/iaas/src/stackit/iaas/models/request.py @@ -5,7 +5,7 @@ This API allows you to create and modify IaaS resources. - The version of the OpenAPI document: 1 + The version of the OpenAPI document: 2beta1 Contact: stackit-iaas@mail.schwarz Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/services/iaas/src/stackit/iaas/models/request_resource.py b/services/iaas/src/stackit/iaas/models/request_resource.py index 8ef0cecc..87390c5c 100644 --- a/services/iaas/src/stackit/iaas/models/request_resource.py +++ b/services/iaas/src/stackit/iaas/models/request_resource.py @@ -5,7 +5,7 @@ This API allows you to create and modify IaaS resources. - The version of the OpenAPI document: 1 + The version of the OpenAPI document: 2beta1 Contact: stackit-iaas@mail.schwarz Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/services/iaas/src/stackit/iaas/models/rescue_server_payload.py b/services/iaas/src/stackit/iaas/models/rescue_server_payload.py index 128f4702..10f550e0 100644 --- a/services/iaas/src/stackit/iaas/models/rescue_server_payload.py +++ b/services/iaas/src/stackit/iaas/models/rescue_server_payload.py @@ -5,7 +5,7 @@ This API allows you to create and modify IaaS resources. - The version of the OpenAPI document: 1 + The version of the OpenAPI document: 2beta1 Contact: stackit-iaas@mail.schwarz Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/services/iaas/src/stackit/iaas/models/resize_server_payload.py b/services/iaas/src/stackit/iaas/models/resize_server_payload.py index 4b1f0f38..071ff281 100644 --- a/services/iaas/src/stackit/iaas/models/resize_server_payload.py +++ b/services/iaas/src/stackit/iaas/models/resize_server_payload.py @@ -5,7 +5,7 @@ This API allows you to create and modify IaaS resources. - The version of the OpenAPI document: 1 + The version of the OpenAPI document: 2beta1 Contact: stackit-iaas@mail.schwarz Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/services/iaas/src/stackit/iaas/models/resize_volume_payload.py b/services/iaas/src/stackit/iaas/models/resize_volume_payload.py index 553134bf..9c0001da 100644 --- a/services/iaas/src/stackit/iaas/models/resize_volume_payload.py +++ b/services/iaas/src/stackit/iaas/models/resize_volume_payload.py @@ -5,7 +5,7 @@ This API allows you to create and modify IaaS resources. - The version of the OpenAPI document: 1 + The version of the OpenAPI document: 2beta1 Contact: stackit-iaas@mail.schwarz Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/services/iaas/src/stackit/iaas/models/route.py b/services/iaas/src/stackit/iaas/models/route.py index 527db938..142dd67a 100644 --- a/services/iaas/src/stackit/iaas/models/route.py +++ b/services/iaas/src/stackit/iaas/models/route.py @@ -5,7 +5,7 @@ This API allows you to create and modify IaaS resources. - The version of the OpenAPI document: 1 + The version of the OpenAPI document: 2beta1 Contact: stackit-iaas@mail.schwarz Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -23,6 +23,9 @@ from pydantic import BaseModel, ConfigDict, Field, field_validator from typing_extensions import Annotated, Self +from stackit.iaas.models.route_destination import RouteDestination +from stackit.iaas.models.route_nexthop import RouteNexthop + class Route(BaseModel): """ @@ -32,46 +35,22 @@ class Route(BaseModel): created_at: Optional[datetime] = Field( default=None, description="Date-time when resource was created.", alias="createdAt" ) + destination: RouteDestination + id: Optional[Annotated[str, Field(min_length=36, strict=True, max_length=36)]] = Field( + default=None, description="Universally Unique Identifier (UUID)." + ) labels: Optional[Dict[str, Any]] = Field( default=None, - description="Object that represents the labels of an object. Regex for keys: `^[a-z]((-|_|[a-z0-9])){0,62}$`. Regex for values: `^(-|_|[a-z0-9]){0,63}$`. Providing a `null` value for a key will remove that key.", - ) - nexthop: Annotated[str, Field(strict=True)] = Field(description="Object that represents an IP address.") - prefix: Annotated[str, Field(strict=True)] = Field(description="Classless Inter-Domain Routing (CIDR).") - route_id: Optional[Annotated[str, Field(min_length=36, strict=True, max_length=36)]] = Field( - default=None, description="Universally Unique Identifier (UUID).", alias="routeId" + description="Object that represents the labels of an object. Regex for keys: `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a `null` value for a key will remove that key.", ) + nexthop: RouteNexthop updated_at: Optional[datetime] = Field( default=None, description="Date-time when resource was last updated.", alias="updatedAt" ) - __properties: ClassVar[List[str]] = ["createdAt", "labels", "nexthop", "prefix", "routeId", "updatedAt"] - - @field_validator("nexthop") - def nexthop_validate_regular_expression(cls, value): - """Validates the regular expression""" - if not re.match( - r"((^\s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))\s*$)|(^\s*((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$))", - value, - ): - raise ValueError( - r"must validate the regular expression /((^\s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))\s*$)|(^\s*((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$))/" - ) - return value - - @field_validator("prefix") - def prefix_validate_regular_expression(cls, value): - """Validates the regular expression""" - if not re.match( - r"^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(\/(3[0-2]|2[0-9]|1[0-9]|[0-9]))$|^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))(\/((1(1[0-9]|2[0-8]))|([0-9][0-9])|([0-9])))?$", - value, - ): - raise ValueError( - r"must validate the regular expression /^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(\/(3[0-2]|2[0-9]|1[0-9]|[0-9]))$|^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))(\/((1(1[0-9]|2[0-8]))|([0-9][0-9])|([0-9])))?$/" - ) - return value + __properties: ClassVar[List[str]] = ["createdAt", "destination", "id", "labels", "nexthop", "updatedAt"] - @field_validator("route_id") - def route_id_validate_regular_expression(cls, value): + @field_validator("id") + def id_validate_regular_expression(cls, value): """Validates the regular expression""" if value is None: return value @@ -118,7 +97,7 @@ def to_dict(self) -> Dict[str, Any]: excluded_fields: Set[str] = set( [ "created_at", - "route_id", + "id", "updated_at", ] ) @@ -128,6 +107,12 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # override the default output from pydantic by calling `to_dict()` of destination + if self.destination: + _dict["destination"] = self.destination.to_dict() + # override the default output from pydantic by calling `to_dict()` of nexthop + if self.nexthop: + _dict["nexthop"] = self.nexthop.to_dict() return _dict @classmethod @@ -142,10 +127,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate( { "createdAt": obj.get("createdAt"), + "destination": ( + RouteDestination.from_dict(obj["destination"]) if obj.get("destination") is not None else None + ), + "id": obj.get("id"), "labels": obj.get("labels"), - "nexthop": obj.get("nexthop"), - "prefix": obj.get("prefix"), - "routeId": obj.get("routeId"), + "nexthop": RouteNexthop.from_dict(obj["nexthop"]) if obj.get("nexthop") is not None else None, "updatedAt": obj.get("updatedAt"), } ) diff --git a/services/iaas/src/stackit/iaas/models/route_destination.py b/services/iaas/src/stackit/iaas/models/route_destination.py new file mode 100644 index 00000000..6b7d39ae --- /dev/null +++ b/services/iaas/src/stackit/iaas/models/route_destination.py @@ -0,0 +1,151 @@ +# coding: utf-8 + +""" + IaaS-API + + This API allows you to create and modify IaaS resources. + + The version of the OpenAPI document: 2beta1 + Contact: stackit-iaas@mail.schwarz + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +from __future__ import annotations + +import json +import pprint +from typing import Any, Dict, Optional, Set, Union + +from pydantic import ( + BaseModel, + ConfigDict, + ValidationError, + field_validator, +) +from typing_extensions import Self + +from stackit.iaas.models.destination_cidrv4 import DestinationCIDRv4 +from stackit.iaas.models.destination_cidrv6 import DestinationCIDRv6 + + +ROUTEDESTINATION_ONE_OF_SCHEMAS = ["DestinationCIDRv4", "DestinationCIDRv6"] + + +class RouteDestination(BaseModel): + """ + RouteDestination + """ + + # data type: DestinationCIDRv4 + oneof_schema_1_validator: Optional[DestinationCIDRv4] = None + # data type: DestinationCIDRv6 + oneof_schema_2_validator: Optional[DestinationCIDRv6] = None + actual_instance: Optional[Union[DestinationCIDRv4, DestinationCIDRv6]] = None + one_of_schemas: Set[str] = {"DestinationCIDRv4", "DestinationCIDRv6"} + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + discriminator_value_class_map: Dict[str, str] = {} + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator("actual_instance") + def actual_instance_must_validate_oneof(cls, v): + instance = RouteDestination.model_construct() + error_messages = [] + match = 0 + # validate data type: DestinationCIDRv4 + if not isinstance(v, DestinationCIDRv4): + error_messages.append(f"Error! Input type `{type(v)}` is not `DestinationCIDRv4`") + else: + match += 1 + # validate data type: DestinationCIDRv6 + if not isinstance(v, DestinationCIDRv6): + error_messages.append(f"Error! Input type `{type(v)}` is not `DestinationCIDRv6`") + else: + match += 1 + if match == 0: + # no match + raise ValueError( + "No match found when setting `actual_instance` in RouteDestination with oneOf schemas: DestinationCIDRv4, DestinationCIDRv6. Details: " + + ", ".join(error_messages) + ) + else: + return v + + @classmethod + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # deserialize data into DestinationCIDRv4 + try: + instance.actual_instance = DestinationCIDRv4.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into DestinationCIDRv6 + try: + instance.actual_instance = DestinationCIDRv6.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError( + "Multiple matches found when deserializing the JSON string into RouteDestination with oneOf schemas: DestinationCIDRv4, DestinationCIDRv6. Details: " + + ", ".join(error_messages) + ) + elif match == 0: + # no match + raise ValueError( + "No match found when deserializing the JSON string into RouteDestination with oneOf schemas: DestinationCIDRv4, DestinationCIDRv6. Details: " + + ", ".join(error_messages) + ) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], DestinationCIDRv4, DestinationCIDRv6]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) diff --git a/services/iaas/src/stackit/iaas/models/route_list_response.py b/services/iaas/src/stackit/iaas/models/route_list_response.py index 2071e5e1..324c8420 100644 --- a/services/iaas/src/stackit/iaas/models/route_list_response.py +++ b/services/iaas/src/stackit/iaas/models/route_list_response.py @@ -5,7 +5,7 @@ This API allows you to create and modify IaaS resources. - The version of the OpenAPI document: 1 + The version of the OpenAPI document: 2beta1 Contact: stackit-iaas@mail.schwarz Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/services/iaas/src/stackit/iaas/models/route_nexthop.py b/services/iaas/src/stackit/iaas/models/route_nexthop.py new file mode 100644 index 00000000..50384b26 --- /dev/null +++ b/services/iaas/src/stackit/iaas/models/route_nexthop.py @@ -0,0 +1,179 @@ +# coding: utf-8 + +""" + IaaS-API + + This API allows you to create and modify IaaS resources. + + The version of the OpenAPI document: 2beta1 + Contact: stackit-iaas@mail.schwarz + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +from __future__ import annotations + +import json +import pprint +from typing import Any, Dict, Optional, Set, Union + +from pydantic import ( + BaseModel, + ConfigDict, + ValidationError, + field_validator, +) +from typing_extensions import Self + +from stackit.iaas.models.nexthop_blackhole import NexthopBlackhole +from stackit.iaas.models.nexthop_internet import NexthopInternet +from stackit.iaas.models.nexthop_ipv4 import NexthopIPv4 +from stackit.iaas.models.nexthop_ipv6 import NexthopIPv6 + + +ROUTENEXTHOP_ONE_OF_SCHEMAS = ["NexthopBlackhole", "NexthopIPv4", "NexthopIPv6", "NexthopInternet"] + + +class RouteNexthop(BaseModel): + """ + RouteNexthop + """ + + # data type: NexthopIPv4 + oneof_schema_1_validator: Optional[NexthopIPv4] = None + # data type: NexthopIPv6 + oneof_schema_2_validator: Optional[NexthopIPv6] = None + # data type: NexthopInternet + oneof_schema_3_validator: Optional[NexthopInternet] = None + # data type: NexthopBlackhole + oneof_schema_4_validator: Optional[NexthopBlackhole] = None + actual_instance: Optional[Union[NexthopBlackhole, NexthopIPv4, NexthopIPv6, NexthopInternet]] = None + one_of_schemas: Set[str] = {"NexthopBlackhole", "NexthopIPv4", "NexthopIPv6", "NexthopInternet"} + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + discriminator_value_class_map: Dict[str, str] = {} + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator("actual_instance") + def actual_instance_must_validate_oneof(cls, v): + instance = RouteNexthop.model_construct() + error_messages = [] + match = 0 + # validate data type: NexthopIPv4 + if not isinstance(v, NexthopIPv4): + error_messages.append(f"Error! Input type `{type(v)}` is not `NexthopIPv4`") + else: + match += 1 + # validate data type: NexthopIPv6 + if not isinstance(v, NexthopIPv6): + error_messages.append(f"Error! Input type `{type(v)}` is not `NexthopIPv6`") + else: + match += 1 + # validate data type: NexthopInternet + if not isinstance(v, NexthopInternet): + error_messages.append(f"Error! Input type `{type(v)}` is not `NexthopInternet`") + else: + match += 1 + # validate data type: NexthopBlackhole + if not isinstance(v, NexthopBlackhole): + error_messages.append(f"Error! Input type `{type(v)}` is not `NexthopBlackhole`") + else: + match += 1 + if match == 0: + # no match + raise ValueError( + "No match found when setting `actual_instance` in RouteNexthop with oneOf schemas: NexthopBlackhole, NexthopIPv4, NexthopIPv6, NexthopInternet. Details: " + + ", ".join(error_messages) + ) + else: + return v + + @classmethod + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # deserialize data into NexthopIPv4 + try: + instance.actual_instance = NexthopIPv4.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into NexthopIPv6 + try: + instance.actual_instance = NexthopIPv6.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into NexthopInternet + try: + instance.actual_instance = NexthopInternet.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into NexthopBlackhole + try: + instance.actual_instance = NexthopBlackhole.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError( + "Multiple matches found when deserializing the JSON string into RouteNexthop with oneOf schemas: NexthopBlackhole, NexthopIPv4, NexthopIPv6, NexthopInternet. Details: " + + ", ".join(error_messages) + ) + elif match == 0: + # no match + raise ValueError( + "No match found when deserializing the JSON string into RouteNexthop with oneOf schemas: NexthopBlackhole, NexthopIPv4, NexthopIPv6, NexthopInternet. Details: " + + ", ".join(error_messages) + ) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], NexthopBlackhole, NexthopIPv4, NexthopIPv6, NexthopInternet]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) diff --git a/services/iaas/src/stackit/iaas/models/routing_table.py b/services/iaas/src/stackit/iaas/models/routing_table.py new file mode 100644 index 00000000..e8322f95 --- /dev/null +++ b/services/iaas/src/stackit/iaas/models/routing_table.py @@ -0,0 +1,157 @@ +# coding: utf-8 + +""" + IaaS-API + + This API allows you to create and modify IaaS resources. + + The version of the OpenAPI document: 2beta1 + Contact: stackit-iaas@mail.schwarz + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from datetime import datetime +from typing import Any, ClassVar, Dict, List, Optional, Set + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, field_validator +from typing_extensions import Annotated, Self + + +class RoutingTable(BaseModel): + """ + An object representing a routing table. + """ # noqa: E501 + + created_at: Optional[datetime] = Field( + default=None, description="Date-time when resource was created.", alias="createdAt" + ) + default: Optional[StrictBool] = Field( + default=True, + description="This is the default routing table. It can't be deleted and is used if the user does not specify it otherwise.", + ) + description: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field( + default=None, description="Description Object. Allows string up to 255 Characters." + ) + id: Optional[Annotated[str, Field(min_length=36, strict=True, max_length=36)]] = Field( + default=None, description="Universally Unique Identifier (UUID)." + ) + labels: Optional[Dict[str, Any]] = Field( + default=None, + description="Object that represents the labels of an object. Regex for keys: `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a `null` value for a key will remove that key.", + ) + name: Annotated[str, Field(strict=True, max_length=127)] = Field( + description="The name for a General Object. Matches Names and also UUIDs." + ) + system_routes: Optional[StrictBool] = Field(default=True, alias="systemRoutes") + updated_at: Optional[datetime] = Field( + default=None, description="Date-time when resource was last updated.", alias="updatedAt" + ) + __properties: ClassVar[List[str]] = [ + "createdAt", + "default", + "description", + "id", + "labels", + "name", + "systemRoutes", + "updatedAt", + ] + + @field_validator("id") + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$", value): + raise ValueError( + r"must validate the regular expression /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/" + ) + return value + + @field_validator("name") + def name_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^[A-Za-z0-9]+([ \/._-]*[A-Za-z0-9]+)*$", value): + raise ValueError(r"must validate the regular expression /^[A-Za-z0-9]+([ \/._-]*[A-Za-z0-9]+)*$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of RoutingTable from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + """ + excluded_fields: Set[str] = set( + [ + "created_at", + "default", + "id", + "updated_at", + ] + ) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of RoutingTable from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "createdAt": obj.get("createdAt"), + "default": obj.get("default") if obj.get("default") is not None else True, + "description": obj.get("description"), + "id": obj.get("id"), + "labels": obj.get("labels"), + "name": obj.get("name"), + "systemRoutes": obj.get("systemRoutes") if obj.get("systemRoutes") is not None else True, + "updatedAt": obj.get("updatedAt"), + } + ) + return _obj diff --git a/services/iaas/src/stackit/iaas/models/routing_table_list_response.py b/services/iaas/src/stackit/iaas/models/routing_table_list_response.py new file mode 100644 index 00000000..b9550f1e --- /dev/null +++ b/services/iaas/src/stackit/iaas/models/routing_table_list_response.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + IaaS-API + + This API allows you to create and modify IaaS resources. + + The version of the OpenAPI document: 2beta1 + Contact: stackit-iaas@mail.schwarz + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +from __future__ import annotations + +import json +import pprint +from typing import Any, ClassVar, Dict, List, Optional, Set + +from pydantic import BaseModel, ConfigDict, Field +from typing_extensions import Self + +from stackit.iaas.models.routing_table import RoutingTable + + +class RoutingTableListResponse(BaseModel): + """ + Routing table response. + """ # noqa: E501 + + items: List[RoutingTable] = Field(description="A list of routing tables.") + __properties: ClassVar[List[str]] = ["items"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of RoutingTableListResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in items (list) + _items = [] + if self.items: + for _item in self.items: + if _item: + _items.append(_item.to_dict()) + _dict["items"] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of RoutingTableListResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "items": ( + [RoutingTable.from_dict(_item) for _item in obj["items"]] if obj.get("items") is not None else None + ) + } + ) + return _obj diff --git a/services/iaas/src/stackit/iaas/models/security_group.py b/services/iaas/src/stackit/iaas/models/security_group.py index 37c37aac..6983f5e3 100644 --- a/services/iaas/src/stackit/iaas/models/security_group.py +++ b/services/iaas/src/stackit/iaas/models/security_group.py @@ -5,7 +5,7 @@ This API allows you to create and modify IaaS resources. - The version of the OpenAPI document: 1 + The version of the OpenAPI document: 2beta1 Contact: stackit-iaas@mail.schwarz Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -42,7 +42,7 @@ class SecurityGroup(BaseModel): ) labels: Optional[Dict[str, Any]] = Field( default=None, - description="Object that represents the labels of an object. Regex for keys: `^[a-z]((-|_|[a-z0-9])){0,62}$`. Regex for values: `^(-|_|[a-z0-9]){0,63}$`. Providing a `null` value for a key will remove that key.", + description="Object that represents the labels of an object. Regex for keys: `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a `null` value for a key will remove that key.", ) name: Annotated[str, Field(strict=True, max_length=127)] = Field( description="The name for a General Object. Matches Names and also UUIDs." diff --git a/services/iaas/src/stackit/iaas/models/security_group_list_response.py b/services/iaas/src/stackit/iaas/models/security_group_list_response.py index ad348dee..35ba81d6 100644 --- a/services/iaas/src/stackit/iaas/models/security_group_list_response.py +++ b/services/iaas/src/stackit/iaas/models/security_group_list_response.py @@ -5,7 +5,7 @@ This API allows you to create and modify IaaS resources. - The version of the OpenAPI document: 1 + The version of the OpenAPI document: 2beta1 Contact: stackit-iaas@mail.schwarz Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/services/iaas/src/stackit/iaas/models/security_group_rule.py b/services/iaas/src/stackit/iaas/models/security_group_rule.py index f88813ea..526ad692 100644 --- a/services/iaas/src/stackit/iaas/models/security_group_rule.py +++ b/services/iaas/src/stackit/iaas/models/security_group_rule.py @@ -5,7 +5,7 @@ This API allows you to create and modify IaaS resources. - The version of the OpenAPI document: 1 + The version of the OpenAPI document: 2beta1 Contact: stackit-iaas@mail.schwarz Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -17,6 +17,7 @@ import json import pprint import re # noqa: F401 +from datetime import datetime from typing import Any, ClassVar, Dict, List, Optional, Set from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator @@ -32,6 +33,9 @@ class SecurityGroupRule(BaseModel): Object that represents a security group rule. """ # noqa: E501 + created_at: Optional[datetime] = Field( + default=None, description="Date-time when resource was created.", alias="createdAt" + ) description: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field( default=None, description="Description Object. Allows string up to 255 Characters." ) @@ -57,8 +61,12 @@ class SecurityGroupRule(BaseModel): security_group_id: Optional[Annotated[str, Field(min_length=36, strict=True, max_length=36)]] = Field( default=None, description="Universally Unique Identifier (UUID).", alias="securityGroupId" ) + updated_at: Optional[datetime] = Field( + default=None, description="Date-time when resource was last updated.", alias="updatedAt" + ) protocol: Optional[Protocol] = None __properties: ClassVar[List[str]] = [ + "createdAt", "description", "direction", "ethertype", @@ -68,6 +76,7 @@ class SecurityGroupRule(BaseModel): "portRange", "remoteSecurityGroupId", "securityGroupId", + "updatedAt", "protocol", ] @@ -153,11 +162,15 @@ def to_dict(self) -> Dict[str, Any]: are ignored. * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. """ excluded_fields: Set[str] = set( [ + "created_at", "id", "security_group_id", + "updated_at", ] ) @@ -188,6 +201,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate( { + "createdAt": obj.get("createdAt"), "description": obj.get("description"), "direction": obj.get("direction"), "ethertype": obj.get("ethertype") if obj.get("ethertype") is not None else "IPv4", @@ -199,6 +213,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "portRange": PortRange.from_dict(obj["portRange"]) if obj.get("portRange") is not None else None, "remoteSecurityGroupId": obj.get("remoteSecurityGroupId"), "securityGroupId": obj.get("securityGroupId"), + "updatedAt": obj.get("updatedAt"), "protocol": Protocol.from_dict(obj["protocol"]) if obj.get("protocol") is not None else None, } ) diff --git a/services/iaas/src/stackit/iaas/models/security_group_rule_list_response.py b/services/iaas/src/stackit/iaas/models/security_group_rule_list_response.py index bb0c6302..5bdc0f38 100644 --- a/services/iaas/src/stackit/iaas/models/security_group_rule_list_response.py +++ b/services/iaas/src/stackit/iaas/models/security_group_rule_list_response.py @@ -5,7 +5,7 @@ This API allows you to create and modify IaaS resources. - The version of the OpenAPI document: 1 + The version of the OpenAPI document: 2beta1 Contact: stackit-iaas@mail.schwarz Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/services/iaas/src/stackit/iaas/models/security_group_rule_protocol.py b/services/iaas/src/stackit/iaas/models/security_group_rule_protocol.py index fff68592..0ddbd60f 100644 --- a/services/iaas/src/stackit/iaas/models/security_group_rule_protocol.py +++ b/services/iaas/src/stackit/iaas/models/security_group_rule_protocol.py @@ -5,7 +5,7 @@ This API allows you to create and modify IaaS resources. - The version of the OpenAPI document: 1 + The version of the OpenAPI document: 2beta1 Contact: stackit-iaas@mail.schwarz Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/services/iaas/src/stackit/iaas/models/server.py b/services/iaas/src/stackit/iaas/models/server.py index 5180c52b..4fdb24d7 100644 --- a/services/iaas/src/stackit/iaas/models/server.py +++ b/services/iaas/src/stackit/iaas/models/server.py @@ -5,7 +5,7 @@ This API allows you to create and modify IaaS resources. - The version of the OpenAPI document: 1 + The version of the OpenAPI document: 2beta1 Contact: stackit-iaas@mail.schwarz Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -31,11 +31,10 @@ from typing_extensions import Annotated, Self from stackit.iaas.models.boot_volume import BootVolume -from stackit.iaas.models.create_server_payload_networking import ( - CreateServerPayloadNetworking, -) +from stackit.iaas.models.server_agent import ServerAgent from stackit.iaas.models.server_maintenance import ServerMaintenance from stackit.iaas.models.server_network import ServerNetwork +from stackit.iaas.models.server_networking import ServerNetworking class Server(BaseModel): @@ -46,6 +45,7 @@ class Server(BaseModel): affinity_group: Optional[Annotated[str, Field(min_length=36, strict=True, max_length=36)]] = Field( default=None, description="The affinity group the server is assigned to.", alias="affinityGroup" ) + agent: Optional[ServerAgent] = None availability_zone: Optional[StrictStr] = Field( default=None, description="This is the availability zone requested during server creation. If none is provided during the creation request and an existing volume will be used as boot volume it will be set to the same availability zone as the volume. For requests with no volumes involved it will be set to the metro availability zone.", @@ -67,7 +67,7 @@ class Server(BaseModel): ) labels: Optional[Dict[str, Any]] = Field( default=None, - description="Object that represents the labels of an object. Regex for keys: `^[a-z]((-|_|[a-z0-9])){0,62}$`. Regex for values: `^(-|_|[a-z0-9]){0,63}$`. Providing a `null` value for a key will remove that key.", + description="Object that represents the labels of an object. Regex for keys: `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a `null` value for a key will remove that key.", ) launched_at: Optional[datetime] = Field( default=None, description="Date-time when resource was launched.", alias="launchedAt" @@ -81,7 +81,7 @@ class Server(BaseModel): description="Object that represents the metadata of an object. Regex for keys: `^[a-zA-Z0-9-_:. ]{1,255}$`. Regex for values: `^.{0,255}$`. Providing a `null` value for a key will remove that key.", ) name: Annotated[str, Field(strict=True, max_length=63)] = Field(description="The name for a Server.") - networking: Optional[CreateServerPayloadNetworking] = None + networking: Optional[ServerNetworking] = None nics: Optional[List[ServerNetwork]] = Field( default=None, description="The list of network interfaces (NICs) attached to the server. Only shown when detailed information is requested.", @@ -118,6 +118,7 @@ class Server(BaseModel): ) __properties: ClassVar[List[str]] = [ "affinityGroup", + "agent", "availabilityZone", "bootVolume", "createdAt", @@ -265,6 +266,9 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # override the default output from pydantic by calling `to_dict()` of agent + if self.agent: + _dict["agent"] = self.agent.to_dict() # override the default output from pydantic by calling `to_dict()` of boot_volume if self.boot_volume: _dict["bootVolume"] = self.boot_volume.to_dict() @@ -295,6 +299,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate( { "affinityGroup": obj.get("affinityGroup"), + "agent": ServerAgent.from_dict(obj["agent"]) if obj.get("agent") is not None else None, "availabilityZone": obj.get("availabilityZone"), "bootVolume": BootVolume.from_dict(obj["bootVolume"]) if obj.get("bootVolume") is not None else None, "createdAt": obj.get("createdAt"), @@ -313,9 +318,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "metadata": obj.get("metadata"), "name": obj.get("name"), "networking": ( - CreateServerPayloadNetworking.from_dict(obj["networking"]) - if obj.get("networking") is not None - else None + ServerNetworking.from_dict(obj["networking"]) if obj.get("networking") is not None else None ), "nics": ( [ServerNetwork.from_dict(_item) for _item in obj["nics"]] if obj.get("nics") is not None else None diff --git a/services/iaas/src/stackit/iaas/models/server_agent.py b/services/iaas/src/stackit/iaas/models/server_agent.py new file mode 100644 index 00000000..7a18490d --- /dev/null +++ b/services/iaas/src/stackit/iaas/models/server_agent.py @@ -0,0 +1,85 @@ +# coding: utf-8 + +""" + IaaS-API + + This API allows you to create and modify IaaS resources. + + The version of the OpenAPI document: 2beta1 + Contact: stackit-iaas@mail.schwarz + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +from __future__ import annotations + +import json +import pprint +from typing import Any, ClassVar, Dict, List, Optional, Set + +from pydantic import BaseModel, ConfigDict, Field, StrictBool +from typing_extensions import Self + + +class ServerAgent(BaseModel): + """ + STACKIT server agent options for a server. + """ # noqa: E501 + + provisioned: Optional[StrictBool] = Field( + default=None, + description="Configure the STACKIT server agent provisioning during the first boot of the server. Only works when booting from an images that supports the STACKIT server agent. When `false` the agent IS NOT installed. When `true` the agent IS installed. When its not set the result depend on the used image and its default provisioning setting.", + ) + __properties: ClassVar[List[str]] = ["provisioned"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ServerAgent from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ServerAgent from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({"provisioned": obj.get("provisioned")}) + return _obj diff --git a/services/iaas/src/stackit/iaas/models/server_console_url.py b/services/iaas/src/stackit/iaas/models/server_console_url.py index 629e8fc2..176b0a9d 100644 --- a/services/iaas/src/stackit/iaas/models/server_console_url.py +++ b/services/iaas/src/stackit/iaas/models/server_console_url.py @@ -5,7 +5,7 @@ This API allows you to create and modify IaaS resources. - The version of the OpenAPI document: 1 + The version of the OpenAPI document: 2beta1 Contact: stackit-iaas@mail.schwarz Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/services/iaas/src/stackit/iaas/models/server_list_response.py b/services/iaas/src/stackit/iaas/models/server_list_response.py index 6be59cdc..2aa34079 100644 --- a/services/iaas/src/stackit/iaas/models/server_list_response.py +++ b/services/iaas/src/stackit/iaas/models/server_list_response.py @@ -5,7 +5,7 @@ This API allows you to create and modify IaaS resources. - The version of the OpenAPI document: 1 + The version of the OpenAPI document: 2beta1 Contact: stackit-iaas@mail.schwarz Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/services/iaas/src/stackit/iaas/models/server_maintenance.py b/services/iaas/src/stackit/iaas/models/server_maintenance.py index 522ed04a..e3cfc2eb 100644 --- a/services/iaas/src/stackit/iaas/models/server_maintenance.py +++ b/services/iaas/src/stackit/iaas/models/server_maintenance.py @@ -5,7 +5,7 @@ This API allows you to create and modify IaaS resources. - The version of the OpenAPI document: 1 + The version of the OpenAPI document: 2beta1 Contact: stackit-iaas@mail.schwarz Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/services/iaas/src/stackit/iaas/models/server_network.py b/services/iaas/src/stackit/iaas/models/server_network.py index 45f1159e..3882542d 100644 --- a/services/iaas/src/stackit/iaas/models/server_network.py +++ b/services/iaas/src/stackit/iaas/models/server_network.py @@ -5,7 +5,7 @@ This API allows you to create and modify IaaS resources. - The version of the OpenAPI document: 1 + The version of the OpenAPI document: 2beta1 Contact: stackit-iaas@mail.schwarz Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/services/iaas/src/stackit/iaas/models/server_networking.py b/services/iaas/src/stackit/iaas/models/server_networking.py new file mode 100644 index 00000000..363c2501 --- /dev/null +++ b/services/iaas/src/stackit/iaas/models/server_networking.py @@ -0,0 +1,151 @@ +# coding: utf-8 + +""" + IaaS-API + + This API allows you to create and modify IaaS resources. + + The version of the OpenAPI document: 2beta1 + Contact: stackit-iaas@mail.schwarz + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +from __future__ import annotations + +import json +import pprint +from typing import Any, Dict, Optional, Set, Union + +from pydantic import ( + BaseModel, + ConfigDict, + ValidationError, + field_validator, +) +from typing_extensions import Self + +from stackit.iaas.models.create_server_networking import CreateServerNetworking +from stackit.iaas.models.create_server_networking_with_nics import ( + CreateServerNetworkingWithNics, +) + + +SERVERNETWORKING_ONE_OF_SCHEMAS = ["CreateServerNetworking", "CreateServerNetworkingWithNics"] + + +class ServerNetworking(BaseModel): + """ + The initial networking setup for the server creation. A network, a nic or nothing can be given. + """ + + # data type: CreateServerNetworking + oneof_schema_1_validator: Optional[CreateServerNetworking] = None + # data type: CreateServerNetworkingWithNics + oneof_schema_2_validator: Optional[CreateServerNetworkingWithNics] = None + actual_instance: Optional[Union[CreateServerNetworking, CreateServerNetworkingWithNics]] = None + one_of_schemas: Set[str] = {"CreateServerNetworking", "CreateServerNetworkingWithNics"} + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator("actual_instance") + def actual_instance_must_validate_oneof(cls, v): + instance = ServerNetworking.model_construct() + error_messages = [] + match = 0 + # validate data type: CreateServerNetworking + if not isinstance(v, CreateServerNetworking): + error_messages.append(f"Error! Input type `{type(v)}` is not `CreateServerNetworking`") + else: + match += 1 + # validate data type: CreateServerNetworkingWithNics + if not isinstance(v, CreateServerNetworkingWithNics): + error_messages.append(f"Error! Input type `{type(v)}` is not `CreateServerNetworkingWithNics`") + else: + match += 1 + if match == 0: + # no match + raise ValueError( + "No match found when setting `actual_instance` in ServerNetworking with oneOf schemas: CreateServerNetworking, CreateServerNetworkingWithNics. Details: " + + ", ".join(error_messages) + ) + else: + return v + + @classmethod + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # deserialize data into CreateServerNetworking + try: + instance.actual_instance = CreateServerNetworking.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into CreateServerNetworkingWithNics + try: + instance.actual_instance = CreateServerNetworkingWithNics.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError( + "Multiple matches found when deserializing the JSON string into ServerNetworking with oneOf schemas: CreateServerNetworking, CreateServerNetworkingWithNics. Details: " + + ", ".join(error_messages) + ) + elif match == 0: + # no match + raise ValueError( + "No match found when deserializing the JSON string into ServerNetworking with oneOf schemas: CreateServerNetworking, CreateServerNetworkingWithNics. Details: " + + ", ".join(error_messages) + ) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], CreateServerNetworking, CreateServerNetworkingWithNics]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) diff --git a/services/iaas/src/stackit/iaas/models/service_account_mail_list_response.py b/services/iaas/src/stackit/iaas/models/service_account_mail_list_response.py index da17ca93..66d8fce4 100644 --- a/services/iaas/src/stackit/iaas/models/service_account_mail_list_response.py +++ b/services/iaas/src/stackit/iaas/models/service_account_mail_list_response.py @@ -5,7 +5,7 @@ This API allows you to create and modify IaaS resources. - The version of the OpenAPI document: 1 + The version of the OpenAPI document: 2beta1 Contact: stackit-iaas@mail.schwarz Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/services/iaas/src/stackit/iaas/models/set_image_share_payload.py b/services/iaas/src/stackit/iaas/models/set_image_share_payload.py index 8a85a54a..4fecb34a 100644 --- a/services/iaas/src/stackit/iaas/models/set_image_share_payload.py +++ b/services/iaas/src/stackit/iaas/models/set_image_share_payload.py @@ -5,7 +5,7 @@ This API allows you to create and modify IaaS resources. - The version of the OpenAPI document: 1 + The version of the OpenAPI document: 2beta1 Contact: stackit-iaas@mail.schwarz Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/services/iaas/src/stackit/iaas/models/snapshot.py b/services/iaas/src/stackit/iaas/models/snapshot.py index 801efd6c..9b26aa3d 100644 --- a/services/iaas/src/stackit/iaas/models/snapshot.py +++ b/services/iaas/src/stackit/iaas/models/snapshot.py @@ -5,7 +5,7 @@ This API allows you to create and modify IaaS resources. - The version of the OpenAPI document: 1 + The version of the OpenAPI document: 2beta1 Contact: stackit-iaas@mail.schwarz Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -37,7 +37,7 @@ class Snapshot(BaseModel): ) labels: Optional[Dict[str, Any]] = Field( default=None, - description="Object that represents the labels of an object. Regex for keys: `^[a-z]((-|_|[a-z0-9])){0,62}$`. Regex for values: `^(-|_|[a-z0-9]){0,63}$`. Providing a `null` value for a key will remove that key.", + description="Object that represents the labels of an object. Regex for keys: `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a `null` value for a key will remove that key.", ) name: Optional[Annotated[str, Field(strict=True, max_length=127)]] = Field( default=None, description="The name for a General Object. Matches Names and also UUIDs." diff --git a/services/iaas/src/stackit/iaas/models/snapshot_list_response.py b/services/iaas/src/stackit/iaas/models/snapshot_list_response.py index bc734291..4162ded9 100644 --- a/services/iaas/src/stackit/iaas/models/snapshot_list_response.py +++ b/services/iaas/src/stackit/iaas/models/snapshot_list_response.py @@ -5,7 +5,7 @@ This API allows you to create and modify IaaS resources. - The version of the OpenAPI document: 1 + The version of the OpenAPI document: 2beta1 Contact: stackit-iaas@mail.schwarz Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/services/iaas/src/stackit/iaas/models/static_area_id.py b/services/iaas/src/stackit/iaas/models/static_area_id.py index 979f9ded..2df99807 100644 --- a/services/iaas/src/stackit/iaas/models/static_area_id.py +++ b/services/iaas/src/stackit/iaas/models/static_area_id.py @@ -5,7 +5,7 @@ This API allows you to create and modify IaaS resources. - The version of the OpenAPI document: 1 + The version of the OpenAPI document: 2beta1 Contact: stackit-iaas@mail.schwarz Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/services/iaas/src/stackit/iaas/models/update_attached_volume_payload.py b/services/iaas/src/stackit/iaas/models/update_attached_volume_payload.py index f3d12c6e..9c0be97b 100644 --- a/services/iaas/src/stackit/iaas/models/update_attached_volume_payload.py +++ b/services/iaas/src/stackit/iaas/models/update_attached_volume_payload.py @@ -5,7 +5,7 @@ This API allows you to create and modify IaaS resources. - The version of the OpenAPI document: 1 + The version of the OpenAPI document: 2beta1 Contact: stackit-iaas@mail.schwarz Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/services/iaas/src/stackit/iaas/models/update_image_payload.py b/services/iaas/src/stackit/iaas/models/update_image_payload.py index 44dff40c..79e4f401 100644 --- a/services/iaas/src/stackit/iaas/models/update_image_payload.py +++ b/services/iaas/src/stackit/iaas/models/update_image_payload.py @@ -5,7 +5,7 @@ This API allows you to create and modify IaaS resources. - The version of the OpenAPI document: 1 + The version of the OpenAPI document: 2beta1 Contact: stackit-iaas@mail.schwarz Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -48,7 +48,7 @@ class UpdateImagePayload(BaseModel): ) labels: Optional[Dict[str, Any]] = Field( default=None, - description="Object that represents the labels of an object. Regex for keys: `^[a-z]((-|_|[a-z0-9])){0,62}$`. Regex for values: `^(-|_|[a-z0-9]){0,63}$`. Providing a `null` value for a key will remove that key.", + description="Object that represents the labels of an object. Regex for keys: `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a `null` value for a key will remove that key.", ) min_disk_size: Optional[StrictInt] = Field(default=None, description="Size in Gigabyte.", alias="minDiskSize") min_ram: Optional[StrictInt] = Field(default=None, description="Size in Megabyte.", alias="minRam") diff --git a/services/iaas/src/stackit/iaas/models/update_image_share_payload.py b/services/iaas/src/stackit/iaas/models/update_image_share_payload.py index 5a291430..3dad977a 100644 --- a/services/iaas/src/stackit/iaas/models/update_image_share_payload.py +++ b/services/iaas/src/stackit/iaas/models/update_image_share_payload.py @@ -5,7 +5,7 @@ This API allows you to create and modify IaaS resources. - The version of the OpenAPI document: 1 + The version of the OpenAPI document: 2beta1 Contact: stackit-iaas@mail.schwarz Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/services/iaas/src/stackit/iaas/models/update_key_pair_payload.py b/services/iaas/src/stackit/iaas/models/update_key_pair_payload.py index 52abf970..6b068953 100644 --- a/services/iaas/src/stackit/iaas/models/update_key_pair_payload.py +++ b/services/iaas/src/stackit/iaas/models/update_key_pair_payload.py @@ -5,7 +5,7 @@ This API allows you to create and modify IaaS resources. - The version of the OpenAPI document: 1 + The version of the OpenAPI document: 2beta1 Contact: stackit-iaas@mail.schwarz Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -29,7 +29,7 @@ class UpdateKeyPairPayload(BaseModel): labels: Optional[Dict[str, Any]] = Field( default=None, - description="Object that represents the labels of an object. Regex for keys: `^[a-z]((-|_|[a-z0-9])){0,62}$`. Regex for values: `^(-|_|[a-z0-9]){0,63}$`. Providing a `null` value for a key will remove that key.", + description="Object that represents the labels of an object. Regex for keys: `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a `null` value for a key will remove that key.", ) __properties: ClassVar[List[str]] = ["labels"] diff --git a/services/iaas/src/stackit/iaas/models/update_management_network_route_payload.py b/services/iaas/src/stackit/iaas/models/update_management_network_route_payload.py new file mode 100644 index 00000000..233c88d7 --- /dev/null +++ b/services/iaas/src/stackit/iaas/models/update_management_network_route_payload.py @@ -0,0 +1,85 @@ +# coding: utf-8 + +""" + IaaS-API + + This API allows you to create and modify IaaS resources. + + The version of the OpenAPI document: 2beta1 + Contact: stackit-iaas@mail.schwarz + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +from __future__ import annotations + +import json +import pprint +from typing import Any, ClassVar, Dict, List, Optional, Set + +from pydantic import BaseModel, ConfigDict, Field +from typing_extensions import Self + + +class UpdateManagementNetworkRoutePayload(BaseModel): + """ + Object that represents the request body for a management route update. + """ # noqa: E501 + + labels: Optional[Dict[str, Any]] = Field( + default=None, + description="Object that represents the labels of an object. Regex for keys: `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a `null` value for a key will remove that key.", + ) + __properties: ClassVar[List[str]] = ["labels"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UpdateManagementNetworkRoutePayload from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UpdateManagementNetworkRoutePayload from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({"labels": obj.get("labels")}) + return _obj diff --git a/services/iaas/src/stackit/iaas/models/update_network_ipv4_body.py b/services/iaas/src/stackit/iaas/models/update_network_ipv4_body.py index d260c85b..7f727b33 100644 --- a/services/iaas/src/stackit/iaas/models/update_network_ipv4_body.py +++ b/services/iaas/src/stackit/iaas/models/update_network_ipv4_body.py @@ -5,7 +5,7 @@ This API allows you to create and modify IaaS resources. - The version of the OpenAPI document: 1 + The version of the OpenAPI document: 2beta1 Contact: stackit-iaas@mail.schwarz Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -30,7 +30,7 @@ class UpdateNetworkIPv4Body(BaseModel): gateway: Optional[Annotated[str, Field(strict=True)]] = Field( default=None, - description="The gateway of a network. If not specified the first IP of the network will be assigned as the gateway. If 'null' is sent, then the network doesn't have a gateway.", + description="The IPv4 gateway of a network. If not specified the first IP of the network will be assigned as the gateway. If 'null' is sent, then the network doesn't have a gateway.", ) nameservers: Optional[Annotated[List[Annotated[str, Field(strict=True)]], Field(max_length=3)]] = Field( default=None, description="A list containing DNS Servers/Nameservers for IPv4." @@ -44,11 +44,11 @@ def gateway_validate_regular_expression(cls, value): return value if not re.match( - r"((^\s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))\s*$)|(^\s*((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$))", + r"^\s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))\s*$", value, ): raise ValueError( - r"must validate the regular expression /((^\s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))\s*$)|(^\s*((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$))/" + r"must validate the regular expression /^\s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))\s*$/" ) return value diff --git a/services/iaas/src/stackit/iaas/models/update_network_ipv6_body.py b/services/iaas/src/stackit/iaas/models/update_network_ipv6_body.py index e50d99af..40808869 100644 --- a/services/iaas/src/stackit/iaas/models/update_network_ipv6_body.py +++ b/services/iaas/src/stackit/iaas/models/update_network_ipv6_body.py @@ -5,7 +5,7 @@ This API allows you to create and modify IaaS resources. - The version of the OpenAPI document: 1 + The version of the OpenAPI document: 2beta1 Contact: stackit-iaas@mail.schwarz Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -30,7 +30,7 @@ class UpdateNetworkIPv6Body(BaseModel): gateway: Optional[Annotated[str, Field(strict=True)]] = Field( default=None, - description="The gateway of a network. If not specified the first IP of the network will be assigned as the gateway. If 'null' is sent, then the network doesn't have a gateway.", + description="The IPv6 gateway of a network. If not specified the first IP of the network will be assigned as the gateway. If 'null' is sent, then the network doesn't have a gateway.", ) nameservers: Optional[Annotated[List[Annotated[str, Field(strict=True)]], Field(max_length=3)]] = Field( default=None, description="A list containing DNS Servers/Nameservers for IPv6." @@ -44,11 +44,11 @@ def gateway_validate_regular_expression(cls, value): return value if not re.match( - r"((^\s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))\s*$)|(^\s*((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$))", + r"^\s*((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$", value, ): raise ValueError( - r"must validate the regular expression /((^\s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))\s*$)|(^\s*((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$))/" + r"must validate the regular expression /^\s*((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$/" ) return value diff --git a/services/iaas/src/stackit/iaas/models/update_nic_payload.py b/services/iaas/src/stackit/iaas/models/update_nic_payload.py index 08089e9e..701254a4 100644 --- a/services/iaas/src/stackit/iaas/models/update_nic_payload.py +++ b/services/iaas/src/stackit/iaas/models/update_nic_payload.py @@ -5,7 +5,7 @@ This API allows you to create and modify IaaS resources. - The version of the OpenAPI document: 1 + The version of the OpenAPI document: 2beta1 Contact: stackit-iaas@mail.schwarz Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -33,9 +33,12 @@ class UpdateNicPayload(BaseModel): allowed_addresses: Optional[List[AllowedAddressesInner]] = Field( default=None, description="A list of IPs or CIDR notations.", alias="allowedAddresses" ) + description: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field( + default=None, description="Description Object. Allows string up to 255 Characters." + ) labels: Optional[Dict[str, Any]] = Field( default=None, - description="Object that represents the labels of an object. Regex for keys: `^[a-z]((-|_|[a-z0-9])){0,62}$`. Regex for values: `^(-|_|[a-z0-9]){0,63}$`. Providing a `null` value for a key will remove that key.", + description="Object that represents the labels of an object. Regex for keys: `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a `null` value for a key will remove that key.", ) name: Optional[Annotated[str, Field(strict=True, max_length=127)]] = Field( default=None, description="The name for a General Object. Matches Names and also UUIDs." @@ -48,7 +51,14 @@ class UpdateNicPayload(BaseModel): security_groups: Optional[List[Annotated[str, Field(min_length=36, strict=True, max_length=36)]]] = Field( default=None, description="A list of UUIDs.", alias="securityGroups" ) - __properties: ClassVar[List[str]] = ["allowedAddresses", "labels", "name", "nicSecurity", "securityGroups"] + __properties: ClassVar[List[str]] = [ + "allowedAddresses", + "description", + "labels", + "name", + "nicSecurity", + "securityGroups", + ] @field_validator("name") def name_validate_regular_expression(cls, value): @@ -122,6 +132,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if obj.get("allowedAddresses") is not None else None ), + "description": obj.get("description"), "labels": obj.get("labels"), "name": obj.get("name"), "nicSecurity": obj.get("nicSecurity"), diff --git a/services/iaas/src/stackit/iaas/models/update_public_ip_payload.py b/services/iaas/src/stackit/iaas/models/update_public_ip_payload.py index 13e5d685..14005a1c 100644 --- a/services/iaas/src/stackit/iaas/models/update_public_ip_payload.py +++ b/services/iaas/src/stackit/iaas/models/update_public_ip_payload.py @@ -5,7 +5,7 @@ This API allows you to create and modify IaaS resources. - The version of the OpenAPI document: 1 + The version of the OpenAPI document: 2beta1 Contact: stackit-iaas@mail.schwarz Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -32,11 +32,11 @@ class UpdatePublicIPPayload(BaseModel): default=None, description="Universally Unique Identifier (UUID)." ) ip: Optional[Annotated[str, Field(strict=True)]] = Field( - default=None, description="Object that represents an IP address." + default=None, description="String that represents an IPv4 address." ) labels: Optional[Dict[str, Any]] = Field( default=None, - description="Object that represents the labels of an object. Regex for keys: `^[a-z]((-|_|[a-z0-9])){0,62}$`. Regex for values: `^(-|_|[a-z0-9]){0,63}$`. Providing a `null` value for a key will remove that key.", + description="Object that represents the labels of an object. Regex for keys: `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a `null` value for a key will remove that key.", ) network_interface: Optional[Annotated[str, Field(min_length=36, strict=True, max_length=36)]] = Field( default=None, description="Associate the public IP with a network interface (ID).", alias="networkInterface" @@ -62,11 +62,11 @@ def ip_validate_regular_expression(cls, value): return value if not re.match( - r"((^\s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))\s*$)|(^\s*((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$))", + r"^\s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))\s*$", value, ): raise ValueError( - r"must validate the regular expression /((^\s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))\s*$)|(^\s*((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$))/" + r"must validate the regular expression /^\s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))\s*$/" ) return value diff --git a/services/iaas/src/stackit/iaas/models/update_regional_area_ipv4.py b/services/iaas/src/stackit/iaas/models/update_regional_area_ipv4.py new file mode 100644 index 00000000..ffe17524 --- /dev/null +++ b/services/iaas/src/stackit/iaas/models/update_regional_area_ipv4.py @@ -0,0 +1,102 @@ +# coding: utf-8 + +""" + IaaS-API + + This API allows you to create and modify IaaS resources. + + The version of the OpenAPI document: 2beta1 + Contact: stackit-iaas@mail.schwarz + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +from __future__ import annotations + +import json +import pprint +from typing import Any, ClassVar, Dict, List, Optional, Set + +from pydantic import BaseModel, ConfigDict, Field +from typing_extensions import Annotated, Self + + +class UpdateRegionalAreaIPv4(BaseModel): + """ + Object that represents the request body for a regional network area IPv4 configuration update. + """ # noqa: E501 + + default_nameservers: Optional[Annotated[List[Annotated[str, Field(strict=True)]], Field(max_length=3)]] = Field( + default=None, alias="defaultNameservers" + ) + default_prefix_len: Optional[Annotated[int, Field(le=29, strict=True, ge=24)]] = Field( + default=None, + description="The default prefix length for networks in the network area.", + alias="defaultPrefixLen", + ) + max_prefix_len: Optional[Annotated[int, Field(le=29, strict=True, ge=24)]] = Field( + default=None, description="The maximal prefix length for networks in the network area.", alias="maxPrefixLen" + ) + min_prefix_len: Optional[Annotated[int, Field(le=29, strict=True, ge=8)]] = Field( + default=None, description="The minimal prefix length for networks in the network area.", alias="minPrefixLen" + ) + __properties: ClassVar[List[str]] = ["defaultNameservers", "defaultPrefixLen", "maxPrefixLen", "minPrefixLen"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UpdateRegionalAreaIPv4 from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UpdateRegionalAreaIPv4 from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "defaultNameservers": obj.get("defaultNameservers"), + "defaultPrefixLen": obj.get("defaultPrefixLen"), + "maxPrefixLen": obj.get("maxPrefixLen"), + "minPrefixLen": obj.get("minPrefixLen"), + } + ) + return _obj diff --git a/services/iaas/src/stackit/iaas/models/update_route_of_routing_table_payload.py b/services/iaas/src/stackit/iaas/models/update_route_of_routing_table_payload.py new file mode 100644 index 00000000..1b89e29e --- /dev/null +++ b/services/iaas/src/stackit/iaas/models/update_route_of_routing_table_payload.py @@ -0,0 +1,85 @@ +# coding: utf-8 + +""" + IaaS-API + + This API allows you to create and modify IaaS resources. + + The version of the OpenAPI document: 2beta1 + Contact: stackit-iaas@mail.schwarz + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +from __future__ import annotations + +import json +import pprint +from typing import Any, ClassVar, Dict, List, Optional, Set + +from pydantic import BaseModel, ConfigDict, Field +from typing_extensions import Self + + +class UpdateRouteOfRoutingTablePayload(BaseModel): + """ + Object that represents the request body for a route update. + """ # noqa: E501 + + labels: Optional[Dict[str, Any]] = Field( + default=None, + description="Object that represents the labels of an object. Regex for keys: `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a `null` value for a key will remove that key.", + ) + __properties: ClassVar[List[str]] = ["labels"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UpdateRouteOfRoutingTablePayload from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UpdateRouteOfRoutingTablePayload from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({"labels": obj.get("labels")}) + return _obj diff --git a/services/iaas/src/stackit/iaas/models/update_routing_table_of_area_payload.py b/services/iaas/src/stackit/iaas/models/update_routing_table_of_area_payload.py new file mode 100644 index 00000000..6cdab42e --- /dev/null +++ b/services/iaas/src/stackit/iaas/models/update_routing_table_of_area_payload.py @@ -0,0 +1,104 @@ +# coding: utf-8 + +""" + IaaS-API + + This API allows you to create and modify IaaS resources. + + The version of the OpenAPI document: 2beta1 + Contact: stackit-iaas@mail.schwarz + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from typing import Any, ClassVar, Dict, List, Optional, Set + +from pydantic import BaseModel, ConfigDict, Field, field_validator +from typing_extensions import Annotated, Self + + +class UpdateRoutingTableOfAreaPayload(BaseModel): + """ + Object that represents the request body for a routing table update. + """ # noqa: E501 + + description: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field( + default=None, description="Description Object. Allows string up to 255 Characters." + ) + labels: Optional[Dict[str, Any]] = Field( + default=None, + description="Object that represents the labels of an object. Regex for keys: `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a `null` value for a key will remove that key.", + ) + name: Optional[Annotated[str, Field(strict=True, max_length=127)]] = Field( + default=None, description="The name for a General Object. Matches Names and also UUIDs." + ) + __properties: ClassVar[List[str]] = ["description", "labels", "name"] + + @field_validator("name") + def name_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^[A-Za-z0-9]+([ \/._-]*[A-Za-z0-9]+)*$", value): + raise ValueError(r"must validate the regular expression /^[A-Za-z0-9]+([ \/._-]*[A-Za-z0-9]+)*$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UpdateRoutingTableOfAreaPayload from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UpdateRoutingTableOfAreaPayload from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + {"description": obj.get("description"), "labels": obj.get("labels"), "name": obj.get("name")} + ) + return _obj diff --git a/services/iaas/src/stackit/iaas/models/update_server_payload.py b/services/iaas/src/stackit/iaas/models/update_server_payload.py index fd8eaaad..8de023e8 100644 --- a/services/iaas/src/stackit/iaas/models/update_server_payload.py +++ b/services/iaas/src/stackit/iaas/models/update_server_payload.py @@ -5,7 +5,7 @@ This API allows you to create and modify IaaS resources. - The version of the OpenAPI document: 1 + The version of the OpenAPI document: 2beta1 Contact: stackit-iaas@mail.schwarz Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -30,7 +30,7 @@ class UpdateServerPayload(BaseModel): labels: Optional[Dict[str, Any]] = Field( default=None, - description="Object that represents the labels of an object. Regex for keys: `^[a-z]((-|_|[a-z0-9])){0,62}$`. Regex for values: `^(-|_|[a-z0-9]){0,63}$`. Providing a `null` value for a key will remove that key.", + description="Object that represents the labels of an object. Regex for keys: `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a `null` value for a key will remove that key.", ) metadata: Optional[Dict[str, Any]] = Field( default=None, diff --git a/services/iaas/src/stackit/iaas/models/update_volume_payload.py b/services/iaas/src/stackit/iaas/models/update_volume_payload.py index 3b07877b..f9aa8868 100644 --- a/services/iaas/src/stackit/iaas/models/update_volume_payload.py +++ b/services/iaas/src/stackit/iaas/models/update_volume_payload.py @@ -5,7 +5,7 @@ This API allows you to create and modify IaaS resources. - The version of the OpenAPI document: 1 + The version of the OpenAPI document: 2beta1 Contact: stackit-iaas@mail.schwarz Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -37,7 +37,7 @@ class UpdateVolumePayload(BaseModel): image_config: Optional[ImageConfig] = Field(default=None, alias="imageConfig") labels: Optional[Dict[str, Any]] = Field( default=None, - description="Object that represents the labels of an object. Regex for keys: `^[a-z]((-|_|[a-z0-9])){0,62}$`. Regex for values: `^(-|_|[a-z0-9]){0,63}$`. Providing a `null` value for a key will remove that key.", + description="Object that represents the labels of an object. Regex for keys: `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a `null` value for a key will remove that key.", ) name: Optional[Annotated[str, Field(strict=True, max_length=127)]] = Field( default=None, description="The name for a General Object. Matches Names and also UUIDs." diff --git a/services/iaas/src/stackit/iaas/models/v2beta1_configure_network_area_region_payload.py b/services/iaas/src/stackit/iaas/models/v2beta1_configure_network_area_region_payload.py new file mode 100644 index 00000000..1a4d45d1 --- /dev/null +++ b/services/iaas/src/stackit/iaas/models/v2beta1_configure_network_area_region_payload.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + IaaS-API + + This API allows you to create and modify IaaS resources. + + The version of the OpenAPI document: 2beta1 + Contact: stackit-iaas@mail.schwarz + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +from __future__ import annotations + +import json +import pprint +from typing import Any, ClassVar, Dict, List, Optional, Set + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing_extensions import Self + +from stackit.iaas.models.regional_area_ipv4 import RegionalAreaIPv4 + + +class V2beta1ConfigureNetworkAreaRegionPayload(BaseModel): + """ + The basic properties of a regional network area. + """ # noqa: E501 + + ipv4: Optional[RegionalAreaIPv4] = None + status: Optional[StrictStr] = Field( + default=None, + description="The state of a resource object. Possible values: `CREATING`, `CREATED`, `DELETING`, `DELETED`, `FAILED`, `UPDATED`, `UPDATING`.", + ) + __properties: ClassVar[List[str]] = ["ipv4", "status"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of V2beta1ConfigureNetworkAreaRegionPayload from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * OpenAPI `readOnly` fields are excluded. + """ + excluded_fields: Set[str] = set( + [ + "status", + ] + ) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of ipv4 + if self.ipv4: + _dict["ipv4"] = self.ipv4.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of V2beta1ConfigureNetworkAreaRegionPayload from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "ipv4": RegionalAreaIPv4.from_dict(obj["ipv4"]) if obj.get("ipv4") is not None else None, + "status": obj.get("status"), + } + ) + return _obj diff --git a/services/iaas/src/stackit/iaas/models/v2beta1_create_snapshot_payload.py b/services/iaas/src/stackit/iaas/models/v2beta1_create_snapshot_payload.py new file mode 100644 index 00000000..6db35f20 --- /dev/null +++ b/services/iaas/src/stackit/iaas/models/v2beta1_create_snapshot_payload.py @@ -0,0 +1,162 @@ +# coding: utf-8 + +""" + IaaS-API + + This API allows you to create and modify IaaS resources. + + The version of the OpenAPI document: 2beta1 + Contact: stackit-iaas@mail.schwarz + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from datetime import datetime +from typing import Any, ClassVar, Dict, List, Optional, Set + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator +from typing_extensions import Annotated, Self + + +class V2beta1CreateSnapshotPayload(BaseModel): + """ + Object that represents a snapshot. + """ # noqa: E501 + + created_at: Optional[datetime] = Field( + default=None, description="Date-time when resource was created.", alias="createdAt" + ) + id: Optional[Annotated[str, Field(min_length=36, strict=True, max_length=36)]] = Field( + default=None, description="Universally Unique Identifier (UUID)." + ) + labels: Optional[Dict[str, Any]] = Field( + default=None, + description="Object that represents the labels of an object. Regex for keys: `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a `null` value for a key will remove that key.", + ) + name: Optional[Annotated[str, Field(strict=True, max_length=127)]] = Field( + default=None, description="The name for a General Object. Matches Names and also UUIDs." + ) + size: Optional[StrictInt] = Field(default=None, description="Size in Gigabyte.") + status: Optional[StrictStr] = Field( + default=None, + description="The status of a snapshot object. Possible values: `AVAILABLE`, `BACKING-UP`, `CREATING`, `DELETED`, `DELETING`, `ERROR`, `RESTORING`, `UNMANAGING`, `UPDATING`.", + ) + updated_at: Optional[datetime] = Field( + default=None, description="Date-time when resource was last updated.", alias="updatedAt" + ) + volume_id: Annotated[str, Field(min_length=36, strict=True, max_length=36)] = Field( + description="Universally Unique Identifier (UUID).", alias="volumeId" + ) + __properties: ClassVar[List[str]] = ["createdAt", "id", "labels", "name", "size", "status", "updatedAt", "volumeId"] + + @field_validator("id") + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$", value): + raise ValueError( + r"must validate the regular expression /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/" + ) + return value + + @field_validator("name") + def name_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^[A-Za-z0-9]+([ \/._-]*[A-Za-z0-9]+)*$", value): + raise ValueError(r"must validate the regular expression /^[A-Za-z0-9]+([ \/._-]*[A-Za-z0-9]+)*$/") + return value + + @field_validator("volume_id") + def volume_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$", value): + raise ValueError( + r"must validate the regular expression /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/" + ) + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of V2beta1CreateSnapshotPayload from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + """ + excluded_fields: Set[str] = set( + [ + "created_at", + "id", + "size", + "status", + "updated_at", + ] + ) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of V2beta1CreateSnapshotPayload from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "createdAt": obj.get("createdAt"), + "id": obj.get("id"), + "labels": obj.get("labels"), + "name": obj.get("name"), + "size": obj.get("size"), + "status": obj.get("status"), + "updatedAt": obj.get("updatedAt"), + "volumeId": obj.get("volumeId"), + } + ) + return _obj diff --git a/services/iaas/src/stackit/iaas/models/v2beta1_update_backup_payload.py b/services/iaas/src/stackit/iaas/models/v2beta1_update_backup_payload.py new file mode 100644 index 00000000..4191c0dd --- /dev/null +++ b/services/iaas/src/stackit/iaas/models/v2beta1_update_backup_payload.py @@ -0,0 +1,202 @@ +# coding: utf-8 + +""" + IaaS-API + + This API allows you to create and modify IaaS resources. + + The version of the OpenAPI document: 2beta1 + Contact: stackit-iaas@mail.schwarz + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from datetime import datetime +from typing import Any, ClassVar, Dict, List, Optional, Set + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator +from typing_extensions import Annotated, Self + + +class V2beta1UpdateBackupPayload(BaseModel): + """ + Object that represents a backup. + """ # noqa: E501 + + availability_zone: Optional[StrictStr] = Field( + default=None, description="Object that represents an availability zone.", alias="availabilityZone" + ) + created_at: Optional[datetime] = Field( + default=None, description="Date-time when resource was created.", alias="createdAt" + ) + id: Optional[Annotated[str, Field(min_length=36, strict=True, max_length=36)]] = Field( + default=None, description="Universally Unique Identifier (UUID)." + ) + labels: Optional[Dict[str, Any]] = Field( + default=None, + description="Object that represents the labels of an object. Regex for keys: `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a `null` value for a key will remove that key.", + ) + name: Optional[Annotated[str, Field(strict=True, max_length=127)]] = Field( + default=None, description="The name for a General Object. Matches Names and also UUIDs." + ) + size: Optional[StrictInt] = Field(default=None, description="Size in Gigabyte.") + snapshot_id: Optional[Annotated[str, Field(min_length=36, strict=True, max_length=36)]] = Field( + default=None, description="Universally Unique Identifier (UUID).", alias="snapshotId" + ) + status: Optional[StrictStr] = Field( + default=None, + description="The status of a backup object. Possible values: `AVAILABLE`, `CREATING`, `DELETED`, `DELETING`, `ERROR`, `RESTORING`.", + ) + updated_at: Optional[datetime] = Field( + default=None, description="Date-time when resource was last updated.", alias="updatedAt" + ) + volume_id: Optional[Annotated[str, Field(min_length=36, strict=True, max_length=36)]] = Field( + default=None, description="Universally Unique Identifier (UUID).", alias="volumeId" + ) + __properties: ClassVar[List[str]] = [ + "availabilityZone", + "createdAt", + "id", + "labels", + "name", + "size", + "snapshotId", + "status", + "updatedAt", + "volumeId", + ] + + @field_validator("id") + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$", value): + raise ValueError( + r"must validate the regular expression /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/" + ) + return value + + @field_validator("name") + def name_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^[A-Za-z0-9]+([ \/._-]*[A-Za-z0-9]+)*$", value): + raise ValueError(r"must validate the regular expression /^[A-Za-z0-9]+([ \/._-]*[A-Za-z0-9]+)*$/") + return value + + @field_validator("snapshot_id") + def snapshot_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$", value): + raise ValueError( + r"must validate the regular expression /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/" + ) + return value + + @field_validator("volume_id") + def volume_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$", value): + raise ValueError( + r"must validate the regular expression /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/" + ) + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of V2beta1UpdateBackupPayload from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + """ + excluded_fields: Set[str] = set( + [ + "availability_zone", + "created_at", + "id", + "size", + "snapshot_id", + "status", + "updated_at", + "volume_id", + ] + ) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of V2beta1UpdateBackupPayload from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + { + "availabilityZone": obj.get("availabilityZone"), + "createdAt": obj.get("createdAt"), + "id": obj.get("id"), + "labels": obj.get("labels"), + "name": obj.get("name"), + "size": obj.get("size"), + "snapshotId": obj.get("snapshotId"), + "status": obj.get("status"), + "updatedAt": obj.get("updatedAt"), + "volumeId": obj.get("volumeId"), + } + ) + return _obj diff --git a/services/iaas/src/stackit/iaas/models/v2beta1_update_network_area_region_payload.py b/services/iaas/src/stackit/iaas/models/v2beta1_update_network_area_region_payload.py new file mode 100644 index 00000000..250419f2 --- /dev/null +++ b/services/iaas/src/stackit/iaas/models/v2beta1_update_network_area_region_payload.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + IaaS-API + + This API allows you to create and modify IaaS resources. + + The version of the OpenAPI document: 2beta1 + Contact: stackit-iaas@mail.schwarz + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +from __future__ import annotations + +import json +import pprint +from typing import Any, ClassVar, Dict, List, Optional, Set + +from pydantic import BaseModel, ConfigDict +from typing_extensions import Self + +from stackit.iaas.models.update_regional_area_ipv4 import UpdateRegionalAreaIPv4 + + +class V2beta1UpdateNetworkAreaRegionPayload(BaseModel): + """ + Object that represents the request body for a regional network area update. + """ # noqa: E501 + + ipv4: Optional[UpdateRegionalAreaIPv4] = None + __properties: ClassVar[List[str]] = ["ipv4"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of V2beta1UpdateNetworkAreaRegionPayload from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of ipv4 + if self.ipv4: + _dict["ipv4"] = self.ipv4.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of V2beta1UpdateNetworkAreaRegionPayload from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + {"ipv4": UpdateRegionalAreaIPv4.from_dict(obj["ipv4"]) if obj.get("ipv4") is not None else None} + ) + return _obj diff --git a/services/iaas/src/stackit/iaas/models/v2beta1_update_route_of_area_payload.py b/services/iaas/src/stackit/iaas/models/v2beta1_update_route_of_area_payload.py new file mode 100644 index 00000000..1c3ea293 --- /dev/null +++ b/services/iaas/src/stackit/iaas/models/v2beta1_update_route_of_area_payload.py @@ -0,0 +1,85 @@ +# coding: utf-8 + +""" + IaaS-API + + This API allows you to create and modify IaaS resources. + + The version of the OpenAPI document: 2beta1 + Contact: stackit-iaas@mail.schwarz + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +from __future__ import annotations + +import json +import pprint +from typing import Any, ClassVar, Dict, List, Optional, Set + +from pydantic import BaseModel, ConfigDict, Field +from typing_extensions import Self + + +class V2beta1UpdateRouteOfAreaPayload(BaseModel): + """ + Object that represents the request body for a route update. + """ # noqa: E501 + + labels: Optional[Dict[str, Any]] = Field( + default=None, + description="Object that represents the labels of an object. Regex for keys: `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a `null` value for a key will remove that key.", + ) + __properties: ClassVar[List[str]] = ["labels"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of V2beta1UpdateRouteOfAreaPayload from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of V2beta1UpdateRouteOfAreaPayload from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({"labels": obj.get("labels")}) + return _obj diff --git a/services/iaas/src/stackit/iaas/models/v2beta1_update_security_group_payload.py b/services/iaas/src/stackit/iaas/models/v2beta1_update_security_group_payload.py new file mode 100644 index 00000000..37b5e842 --- /dev/null +++ b/services/iaas/src/stackit/iaas/models/v2beta1_update_security_group_payload.py @@ -0,0 +1,104 @@ +# coding: utf-8 + +""" + IaaS-API + + This API allows you to create and modify IaaS resources. + + The version of the OpenAPI document: 2beta1 + Contact: stackit-iaas@mail.schwarz + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from typing import Any, ClassVar, Dict, List, Optional, Set + +from pydantic import BaseModel, ConfigDict, Field, field_validator +from typing_extensions import Annotated, Self + + +class V2beta1UpdateSecurityGroupPayload(BaseModel): + """ + Object that represents an update request body of a security group. + """ # noqa: E501 + + description: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field( + default=None, description="Description Object. Allows string up to 255 Characters." + ) + labels: Optional[Dict[str, Any]] = Field( + default=None, + description="Object that represents the labels of an object. Regex for keys: `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a `null` value for a key will remove that key.", + ) + name: Optional[Annotated[str, Field(strict=True, max_length=127)]] = Field( + default=None, description="The name for a General Object. Matches Names and also UUIDs." + ) + __properties: ClassVar[List[str]] = ["description", "labels", "name"] + + @field_validator("name") + def name_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^[A-Za-z0-9]+([ \/._-]*[A-Za-z0-9]+)*$", value): + raise ValueError(r"must validate the regular expression /^[A-Za-z0-9]+([ \/._-]*[A-Za-z0-9]+)*$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of V2beta1UpdateSecurityGroupPayload from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of V2beta1UpdateSecurityGroupPayload from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate( + {"description": obj.get("description"), "labels": obj.get("labels"), "name": obj.get("name")} + ) + return _obj diff --git a/services/iaas/src/stackit/iaas/models/v2beta1_update_snapshot_payload.py b/services/iaas/src/stackit/iaas/models/v2beta1_update_snapshot_payload.py new file mode 100644 index 00000000..28169038 --- /dev/null +++ b/services/iaas/src/stackit/iaas/models/v2beta1_update_snapshot_payload.py @@ -0,0 +1,99 @@ +# coding: utf-8 + +""" + IaaS-API + + This API allows you to create and modify IaaS resources. + + The version of the OpenAPI document: 2beta1 + Contact: stackit-iaas@mail.schwarz + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +from __future__ import annotations + +import json +import pprint +import re # noqa: F401 +from typing import Any, ClassVar, Dict, List, Optional, Set + +from pydantic import BaseModel, ConfigDict, Field, field_validator +from typing_extensions import Annotated, Self + + +class V2beta1UpdateSnapshotPayload(BaseModel): + """ + Object that represents an update request body of a snapshot. + """ # noqa: E501 + + labels: Optional[Dict[str, Any]] = Field( + default=None, + description="Object that represents the labels of an object. Regex for keys: `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a `null` value for a key will remove that key.", + ) + name: Optional[Annotated[str, Field(strict=True, max_length=127)]] = Field( + default=None, description="The name for a General Object. Matches Names and also UUIDs." + ) + __properties: ClassVar[List[str]] = ["labels", "name"] + + @field_validator("name") + def name_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^[A-Za-z0-9]+([ \/._-]*[A-Za-z0-9]+)*$", value): + raise ValueError(r"must validate the regular expression /^[A-Za-z0-9]+([ \/._-]*[A-Za-z0-9]+)*$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of V2beta1UpdateSnapshotPayload from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of V2beta1UpdateSnapshotPayload from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({"labels": obj.get("labels"), "name": obj.get("name")}) + return _obj diff --git a/services/iaas/src/stackit/iaas/models/volume.py b/services/iaas/src/stackit/iaas/models/volume.py index f98ab446..48740ff4 100644 --- a/services/iaas/src/stackit/iaas/models/volume.py +++ b/services/iaas/src/stackit/iaas/models/volume.py @@ -5,7 +5,7 @@ This API allows you to create and modify IaaS resources. - The version of the OpenAPI document: 1 + The version of the OpenAPI document: 2beta1 Contact: stackit-iaas@mail.schwarz Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -59,7 +59,7 @@ class Volume(BaseModel): image_config: Optional[ImageConfig] = Field(default=None, alias="imageConfig") labels: Optional[Dict[str, Any]] = Field( default=None, - description="Object that represents the labels of an object. Regex for keys: `^[a-z]((-|_|[a-z0-9])){0,62}$`. Regex for values: `^(-|_|[a-z0-9]){0,63}$`. Providing a `null` value for a key will remove that key.", + description="Object that represents the labels of an object. Regex for keys: `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a `null` value for a key will remove that key.", ) name: Optional[Annotated[str, Field(strict=True, max_length=127)]] = Field( default=None, description="The name for a General Object. Matches Names and also UUIDs." diff --git a/services/iaas/src/stackit/iaas/models/volume_attachment.py b/services/iaas/src/stackit/iaas/models/volume_attachment.py index cf0cb4d2..c0b7bddc 100644 --- a/services/iaas/src/stackit/iaas/models/volume_attachment.py +++ b/services/iaas/src/stackit/iaas/models/volume_attachment.py @@ -5,7 +5,7 @@ This API allows you to create and modify IaaS resources. - The version of the OpenAPI document: 1 + The version of the OpenAPI document: 2beta1 Contact: stackit-iaas@mail.schwarz Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/services/iaas/src/stackit/iaas/models/volume_attachment_list_response.py b/services/iaas/src/stackit/iaas/models/volume_attachment_list_response.py index b4ff23e8..58d1a43f 100644 --- a/services/iaas/src/stackit/iaas/models/volume_attachment_list_response.py +++ b/services/iaas/src/stackit/iaas/models/volume_attachment_list_response.py @@ -5,7 +5,7 @@ This API allows you to create and modify IaaS resources. - The version of the OpenAPI document: 1 + The version of the OpenAPI document: 2beta1 Contact: stackit-iaas@mail.schwarz Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/services/iaas/src/stackit/iaas/models/volume_encryption_parameter.py b/services/iaas/src/stackit/iaas/models/volume_encryption_parameter.py index 8af7eeb0..8bd0e578 100644 --- a/services/iaas/src/stackit/iaas/models/volume_encryption_parameter.py +++ b/services/iaas/src/stackit/iaas/models/volume_encryption_parameter.py @@ -5,7 +5,7 @@ This API allows you to create and modify IaaS resources. - The version of the OpenAPI document: 1 + The version of the OpenAPI document: 2beta1 Contact: stackit-iaas@mail.schwarz Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/services/iaas/src/stackit/iaas/models/volume_list_response.py b/services/iaas/src/stackit/iaas/models/volume_list_response.py index 1f1efeb6..08e1cf6e 100644 --- a/services/iaas/src/stackit/iaas/models/volume_list_response.py +++ b/services/iaas/src/stackit/iaas/models/volume_list_response.py @@ -5,7 +5,7 @@ This API allows you to create and modify IaaS resources. - The version of the OpenAPI document: 1 + The version of the OpenAPI document: 2beta1 Contact: stackit-iaas@mail.schwarz Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/services/iaas/src/stackit/iaas/models/volume_performance_class.py b/services/iaas/src/stackit/iaas/models/volume_performance_class.py index 15fa4c10..12afdfdf 100644 --- a/services/iaas/src/stackit/iaas/models/volume_performance_class.py +++ b/services/iaas/src/stackit/iaas/models/volume_performance_class.py @@ -5,7 +5,7 @@ This API allows you to create and modify IaaS resources. - The version of the OpenAPI document: 1 + The version of the OpenAPI document: 2beta1 Contact: stackit-iaas@mail.schwarz Generated by OpenAPI Generator (https://openapi-generator.tech) @@ -34,7 +34,7 @@ class VolumePerformanceClass(BaseModel): iops: Optional[StrictInt] = Field(default=None, description="Input/Output Operations per second.") labels: Optional[Dict[str, Any]] = Field( default=None, - description="Object that represents the labels of an object. Regex for keys: `^[a-z]((-|_|[a-z0-9])){0,62}$`. Regex for values: `^(-|_|[a-z0-9]){0,63}$`. Providing a `null` value for a key will remove that key.", + description="Object that represents the labels of an object. Regex for keys: `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a `null` value for a key will remove that key.", ) name: Annotated[str, Field(strict=True, max_length=127)] = Field( description="The name for a General Object. Matches Names and also UUIDs." diff --git a/services/iaas/src/stackit/iaas/models/volume_performance_class_list_response.py b/services/iaas/src/stackit/iaas/models/volume_performance_class_list_response.py index a446721f..f8df2002 100644 --- a/services/iaas/src/stackit/iaas/models/volume_performance_class_list_response.py +++ b/services/iaas/src/stackit/iaas/models/volume_performance_class_list_response.py @@ -5,7 +5,7 @@ This API allows you to create and modify IaaS resources. - The version of the OpenAPI document: 1 + The version of the OpenAPI document: 2beta1 Contact: stackit-iaas@mail.schwarz Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/services/iaas/src/stackit/iaas/models/volume_source.py b/services/iaas/src/stackit/iaas/models/volume_source.py index 0d2238aa..aba5fff8 100644 --- a/services/iaas/src/stackit/iaas/models/volume_source.py +++ b/services/iaas/src/stackit/iaas/models/volume_source.py @@ -5,7 +5,7 @@ This API allows you to create and modify IaaS resources. - The version of the OpenAPI document: 1 + The version of the OpenAPI document: 2beta1 Contact: stackit-iaas@mail.schwarz Generated by OpenAPI Generator (https://openapi-generator.tech) diff --git a/services/iaas/src/stackit/iaas/rest.py b/services/iaas/src/stackit/iaas/rest.py index 4bdf86cc..c820fdd7 100644 --- a/services/iaas/src/stackit/iaas/rest.py +++ b/services/iaas/src/stackit/iaas/rest.py @@ -5,7 +5,7 @@ This API allows you to create and modify IaaS resources. - The version of the OpenAPI document: 1 + The version of the OpenAPI document: 2beta1 Contact: stackit-iaas@mail.schwarz Generated by OpenAPI Generator (https://openapi-generator.tech)